On 9 May 2012, at 4:38pm, "Shorty" <sho...@shortypen.com> wrote:

> Simon pointed out that the records should never contain NULLs.   I previously 
> used a .CSV flat text file to store the data and am migrating over to 
> sqlite2.   It might not be very good database design, but the reason I do is 
> so the users can add their data, I will check it and if it is good, then I'll 
> assign them a userID number.  So if that field is blank or NULL, it tells me 
> that I have not manually validated that record yet.

No real problem with using NULL, I'm just surprised that you are using both 
NULL and empty strings, since they appear to indicate the same thing.  I 
suggest you do one or the other to pick one, once and for all:

UPDATE maillist SET userID = NULL WHERE userID = ''

or

UPDATE maillist SET userID = '' WHERE userID IS NULL

Then you won't need both clauses in your SELECT command.

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

Reply via email to