On Tue, Sep 14, 2010 at 06:45:24AM -0700, Rich Shepard scratched on the wall:
>    I cannot select rows from a table using the WHERE clause and cannot find
> my error. Perhaps others will see what I miss.
> 
>    The table, Companies, has 1500+ rows. One column is defined as
>    state     CHAR(2),
> 
> but the select statement seeking all rows where state = 'OR' for example
> returns nothing:
> 
> sqlite> select * from Companies where state = 'OR';
> sqlite>

  Try: "select quote( state ) from companies group by state;"

  That will put quotes around the values. 
  
  Look for leading/trailing spaces.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to