Re: [sqlite] How to search for multiple values in a column including null without repeating column name ?

2011-07-02 Thread Vitali Kiruta
If you know for sure column_name won't contain a certain value, for example -1, you could do something like this. select * from table_name where coalesce(column_name, -1) in (1,2,3,-1); On 2 July 2011 10:21, yogibabu wrote: > > consider this: >  SELECT * FROM table_name

Re: [sqlite] New default table on DB initialization

2011-04-08 Thread Vitali Kiruta
Can't you use create table if not exists ... On 8 April 2011 07:17, RAKESH HEMRAJANI wrote: > > Hi, > > Need a default table to be created on database initialization. > > i was able to achieve that by executing one create statement query at the end > of the

Re: [sqlite] Left Join Issue

2011-04-07 Thread Vitali Kiruta
> > SELECT > CallsList.NUMBER,ContactList.LAST_NAME,CallsList.DATE_AND_TIME,CallsList.READ_STATUS,LineSettingsList.LINE_NAME,CallsList.LINE_ID,CallsList.NUM_OF_CALLS > FROM CallsList WHERE NUMBER<='31'AND CALL_TYPE=0 COLLATE NOCASE LEFT JOIN > ContactList ON

Re: [sqlite] sql syntax grammar: single-source

2011-04-05 Thread Vitali Kiruta
> This currently works.  But because it is not part of the language spec, we > do not guarantee that we will continue to support it. Thanks a lot for quick answer. Do you mean the sqlite language spec, or the sql standard? I would be very much in favor of keeping this behavior. It makes select

[sqlite] sql syntax grammar: single-source

2011-04-05 Thread Vitali Kiruta
Hi everybody, I hope somebody could clarify this for me. According to the sql grammar definition, the single-source production does not allow the table-alias after the join-source See http://www.sqlite.org/syntaxdiagrams.html#single-source However, when I'm trying to run this query it works