jerryfan2000 wrote:
> Hi,
> I have a very simple statement like below
> 
> return conn.rawQuery("select date, sum(amount) from entries where
> (date>='"+start+"' and date<='"+end+"') group by date",null);
> 
> This statement works flawlessly in sqlite3 command line. However, it
> returns nothing if I use it within rawQuery method. Is it a bug or I
> am misusing rawQuery? Thanks.

Try:

conn.rawQuery("select date, sum(amount) from entries where (date>=? and
date<=?) group by date", args);

where args is a String[] containing your start and end values.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 1.0 In Print!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to