On Fri, 2 Jan 2004, KL Chin wrote:

> Can anyone help on this problem, why with the query below
> 
> DELETE FROM ABC WHERE datein < '12/29/03';
> 
> All my record date from '1/1/04' to '1/6/04' were delete.
> Where datein was date type.

SQLite is typeless, see: http://www.sqlite.org/datatypes.html, paying
particular attention to section 3.0 on "comparison and sort order."

As a string, "1/1/04" is less than "12/29/03".  If you store your dates in
YYYY-MM-DD format, they'll sort & compare properly as you would expect.

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to