Click here to Skip to main content
Sign Up to vote bad
good
See more: AndroidSqlite
Hi All,
 
I want to write a query like this:
SELECT Name from DEPT where number == number and Name == Name
 
I wrote a similar query in SQLite but this does not work:
 
Cursor c=db.query(viewDepts, columns, deptnumber + deptName+"=?", new String[]{number, Time}, null, null, null);
 
Need Help ASAP.
 
Thanks,
Jason
Posted 19-Apr-11 17:28pm
Edited 23-Apr-11 18:48pm


2 solutions

Take a look at the query [^] and rawQuery [^] documentation. The query methods and the parameter details are listed. You can alternatively also use the rawQuery method, you can pass the sql statement to it with the selection arguments.
  Permalink  
Check out the following link.....
http://mindstick.com/Articles/2643e627-4f5c-45cc-b166-9a9b4c9ff3b1/?Select%20query%20in%20Android%20Application
 
It will help more to understand about 'select query in android application' or android sqlite database.
 
Thanks Everyone!!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 533
1 Ron Beyer 326
2 Tadit Dash 253
3 samadhan_kshirsagar 229
4 OriginalGriff 198
0 Sergey Alexandrovich Kryukov 7,041
1 Prasad_Kulkarni 3,815
2 OriginalGriff 3,557
3 _Amy 3,372
4 CPallini 3,034


Advertise | Privacy | Mobile
Web01 | 2.6.130619.1 | Last Updated 10 Nov 2011
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid