I'm certainly not a SQlite guru, but

>sqlite> select * from sqlite_master where name = 'dly04';
>table|dly04|dly04|1042384|CREATE TABLE dly04(i_stnid integer, 
>national_identifier varchar2(7),
>   local_year integer, local_month integer, local_day integer, etc, etc
>
>   I then imported data from work as tab-delimited.

So your fields are text.

>sqlite> select local_year, local_month, local_day from dly04 where 
>(national_identifier = '615HMAK');
>
>   The last few rows of the query output are...
>
>  2009|  9| 21
>  2009|  9| 22
>  2009|  9| 23
>  2009|  9| 24
>  2009|  9| 25
>  2009|  9| 26
>  2009|  9| 27
>  2009|  9| 28
>  2009|  9| 29
>  2009|  9| 30
>
>   So I *KNOW* that there are rows with local_year = 2009.  But...

... looking like they contain 2009, but what exactly?


>sqlite> select local_year, local_month, local_day from dly04 where 
>(local_year = 2009);
>
>...doesn't find any rows at all.  This should be a no-brainer that works
>in any SQL-compliant implementation.  Neither do I get any rows with
>alternatives like...
>
>  = '2009'  or  == 2009  or  == '2009'

Could you try this:

sqlite> select local_year, local_month, local_day from dly04 where 
local_year like '%2009%';




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to