Pavel Ivanov-2 wrote:
> 
> 
> Yes, it's expected. Column aliases are visible only in GROUP BY/ORDER
> BY/HAVING clauses and outer selects. All other places should use exact
> column expression instead.
> 
> Pavel
> 
> 

Ah, thanks Pavel for the clarification, now it makes sense.
This is a bit inconvenient but i guess i can use a VIEW for the second
select.

I noticed that the same applies for aggregate functions in the select
statement.

I was searching for some documentation in the sqlite site but didn't find
anything so i guess this is defined in the SQL standard.


-- 
View this message in context: 
http://old.nabble.com/%27no-such-column%27-error-returned-in-a-CASE-statement-tp30113686p30123189.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to