Rick Ratchford wrote:
> The Date is being stored as yyyy-mm-dd. Note the "Format$(Date,
> 'yyyy-mm-dd') as Date" that assures this.

The "Date" that appears in the WHERE clause is the value of the Date 
column in the table, not the value of the expression with the "Date" 
alias. You can't actually use aliases in the WHERE clause. You are 
confusing yourself by using the same identifier both for the column name 
and for the alias.

You could write

WHERE Format$(Date, 'yyyy-mm-dd') < sDateTemp

Or else, express sDateTemp in the same format that you have dates stored 
in the table - the format you get when you just run "SELECT Date from 
mytable".

Igor Tandetnik 



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

Reply via email to