On May 27, 2009, at 11:26 AM, Ralf Junker wrote:

> Hello!
>
> Given this SQL:
>
>  drop table if exists t;
>
>  create table t (c);
>
>  select *
>    from t as ta
>    where t.c = ta.c;
>
> SQLite3 chokes with the following error:
>
>  SQL error near line 5: no such column: t.c
>
> Question:
>
> Is this the expected behaviour? I know that the where clause does  
> not make sense, but shouldn't SQLite see both "t.c" and "ta.c" as  
> the same columns instead of reporting the error?


This is the behavior that I expected because I deliberately coded it  
that way.  Once you us an AS clause, the table is thereafter known  
only by its AS name, not its original name.


D. Richard Hipp
d...@hwaci.com



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

Reply via email to