Hi list,
before I open a ticket, I'd like to ask you.

I tried to use views with sqlite 3.1.5 with short_column_names
(as default within 3.x). Below is the script of my try.

As with CheckIns 2230 - 2232 (Tickets #269, etc.) I thought I
can access view elements without defining an alias. That does work
if I create the view like this:
sqlite> create view yy2 as select y1.*, y2.* from y1, y2 where y1.a=y2.c;

But does not work, if I create it this way.
sqlite> create view yy as select y1.a, y1.b, y2.c, y2.d from y1, y2 where 
y1.a=y2.c;

It would be a hard job to change all my view definitions (which where fine for
informix and oracle) to fit sqlite.

Is there any solution available?
Am I doing something wrong?
Or isn't it fixed completely yet?

Kind Regards

  - Jan


C:\devel\js\head\dst>sqlite3 ..\..\sqlite\problem.db SQLite version 3.1.5 Enter ".help" for instructions sqlite> create table y1(a,b); sqlite> create table y2(c,d); sqlite> create view yy as select y1.a, y1.b, y2.c, y2.d from y1, y2 where y1.a=y2.c; sqlite> insert into y1 values (1,2); sqlite> insert into y2 values (1,3); sqlite> select * from yy; 1|2|1|3 sqlite> .headers on sqlite> select * from yy; y1.a|y1.b|y2.c|y2.d 1|2|1|3 sqlite> select * from yy where a=1; SQL error: no such column: a sqlite> select * from yy where y1.a=1; SQL error: no such column: y1.a sqlite> pragma short_column_names; short_column_names 1 sqlite> pragma full_column_names; full_column_names 0 sqlite> create view yy2 as select y1.*, y2.* from y1, y2 where y1.a=y2.c; sqlite> select a,b,c,d from yy2; a|b|c|d 1|2|1|3 sqlite> select * from yy2; a|b|c|d 1|2|1|3


-- Jan Stürtz Software Engineer phone: +49 421 20153 0 CONTACT Software GmbH fax: +49 421 20153 41 Wiener Str. 1-3 mobile: +49 172 43 43 128 28359 Bremen - Germany -



Reply via email to