On 1 Nov 2011, at 12:26pm, Igor Tandetnik wrote:

> Per SQL standard, column aliases can be referenced in ORDER BY, GROUP BY and 
> HAVING clauses. As an extension, SQLite also allows them in WHERE and JOIN ON 
> clauses, but again, such usage is non-standard (though very convenient at 
> times). Neither the standard nor SQLite implementation allow referencing 
> aliases in the SELECT clause.

Am I right that the most convenient way to do this might be by using a VIEW ?  
One could define a VIEW which had a number of columns like

totalPrice = numItems * itemPrice

then use this totalPrice column for things like sorting, right ?

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

Reply via email to