Xavier Aguila wrote:
Thanks John for your answer, you right this statement 'select "t1.a"
from view1;' works fine but the PRAGMA statement "pragma
short_column_names = 1" doesn't have any efect, and i need preserve
the previous behavior.
I've tested with "pragma short_column_names = 1", "pragma
short_column_names = 0", "pragma short_column_names = ON", "pragma
short_column_names = OFF", with no results.
If Somebody have any idea, please let me know.
Thanks and Regards
Xavier
John LeSueur wrote:
Xavier Aguila wrote:
Hi
why this is an error?
sqlite> create table table1( a int, b text, primary key (a));
sqlite> create table table2( c int, d text, primary key (c));
sqlite> CREATE VIEW view1 AS SELECT t1.a, t1.b, t2.c, t2.d FROM
table1 as t1, table2 as t2;
sqlite> insert into table1 values(1, "test1");
sqlite> insert into table1 values(2, "test2");
sqlite> insert into table1 values(3, "test3");
sqlite> insert into table2 values(1, "test4");
.....
3|test3|1|test4
3|test3|2|test5
3|test3|3|test6
sqlite> select a from view1;
SQL error: no such column: a
sqlite> select t1.a from view1;
SQL error: no such column: t1.a
this works fine in version 3.0.8
Regards
Xavier
select "t1.a" from view1; should work. You might wish to use pragma
short_column_names = 1 to preserve the previous behavior.
John LeSueur.
At this point, I would suggest you look at this:
http://www.sqlite.org/cvstrac/wiki?p=ColumnNames
If you find that the latest sqlite doesn't behave as specified on that
page, write a ticket. I think there have been other reports that this
didn't work as expected, but there was a response that I don't remember.
you may want to look at the archives of this mailing list.
John LeSueur