update LSOpenProjects
   set billdate = null
 where len(rtrim(billdate)) < 10;

>Thanks for this, but how do I set a value to null?  I thought null and ''
>were the same, but now I see it is not.

'' means that "the value is an empty string" whereas null means there is no 
value/the value is unknown/the value is not determined yet.

You can "fix" all your dates by doing an:

update <table>
   set <datefield> = <contentfunction>(julianday(<datefield));

where <contentfunction> is one of date time or datetime depending on whether 
the <datefield> is supposed to contain a date, time, or datetime respectively.  
The date will be normalized but the result will be null if the field is blank 
or contains a time outside the 00:00:00 - 23:59:59 valid time strings.




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

Reply via email to