[android-developers] SQL query issue

2011-09-23 Thread Nency Robert
HI all, I found this is a weird issue :( I type this command: *C:\android-sdk-windows\tools>adb shell sqlite3 /data/data/com.android.browser/databases/browser.db 'select count(url) from bookmarks where url like %www.android.com%'* * * *I want to run this query: 'select count(url) from bookmarks

Re: [android-developers] Sql query not working

2011-07-25 Thread Simon Platten
I don't think the == is valid in SQL, if you want to test for equality, just use =. On 25/07/2011 9:06 PM, saurabh kulkarni wrote: Why this query is not working?? My date column has date like:2011-07-25. final Calendar c = Calendar.getInstance();

[android-developers] Sql query not working

2011-07-25 Thread saurabh kulkarni
Why this query is not working?? My date column has date like:2011-07-25. final Calendar c = Calendar.getInstance(); int myMonth = (c.get(Calendar.MONTH)+1); int myDay = c.get(Calendar.DAY_OF_MONTH); String qu

Re: [android-developers] SQL query

2011-01-29 Thread Kostya Vasilyev
Andre, Yes, "recentC != null" is wrong, because a cursor is returned if the query itself succeeds, even if there is no data (for various reasons: the cursor returns the schema of your query, also you can requery the cursor later, and get new data if any is added). Two ways to check existence

[android-developers] SQL query

2011-01-29 Thread André
This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumn

[android-developers] sql query

2009-07-22 Thread mahantesh Hunagund
Hi , I wanted to remove duplicates from the database. In my db duplication can be defined by combination of multiple columns. For example : _id kind type Pidname 1 1 13 aaa 2 1 23 aaa 3 1 13

[android-developers] SQL Query

2009-06-26 Thread M.Manjunatha
Hi Folks, How do i select only one particular row sort by a column using a sqlite query in Android?? Regards, Manjunatha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this gro

[android-developers] SQL Query

2009-06-09 Thread M.Manjunatha
Hi Folks, I have been given a requirement. Say you have five contacts in your phone book. Person1, Person2, Person3, Person4, Person5. You have received messages from the contacts.. Now that, I have to sort in the following manner. Initally, i have to sort in such a way that, I display one mes