RE: [sqlite] coding style

2004-12-14 Thread Drew, Stephen
Also, the data types (in 2.8.15) do not appear to copy over into the newly 
created table...

I had to manually create the table with SQL, then insert into it from the query.

-Original Message-
From: Jakub Adámek [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 13, 2004 3:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] coding style

Yes but then I must repeat the column names in every query in which I use the 
view. It is a bug in SQLite, isn't it?

Jakub

Brass Tilde ([EMAIL PROTECTED]) wrote*:
>
> > create view myview as select t1.a a from t1 inner join t2 on 
> > t1.a=t2.a; create table problem as select * from myview;
>
> Change this last line to:
>
> create table problem as select a as a from myview;
>
> That creates the problem table with just "a" as the field name.
>


Re: [sqlite] coding style

2004-12-13 Thread Jakub Adámek
Yes but then I must repeat the column names in every query in which I use the
view. It is a bug in SQLite, isn't it?

Jakub

Brass Tilde ([EMAIL PROTECTED]) wrote*:
>
> > create view myview as select t1.a a from t1 inner join t2 on t1.a=t2.a;
> > create table problem as select * from myview;
>
> Change this last line to:
>
> create table problem as select a as a from myview;
>
> That creates the problem table with just "a" as the field name.
>



Re: [sqlite] coding style

2004-12-13 Thread Brass Tilde
> create view myview as select t1.a a from t1 inner join t2 on t1.a=t2.a;
> create table problem as select * from myview;

Change this last line to:

create table problem as select a as a from myview;

That creates the problem table with just "a" as the field name.


Re: [sqlite] coding style

2004-12-13 Thread Jakub Adamek
Hi all, I have a nasty problem with VIEWs and column names. I create a 
VIEW by joining two tables. If I use this view to create the table 
'problem', the column name "t1.a" appears instead of the expected (and 
needed) "a".
Is it a bug? Do you have an idea how to use the view so as it works?

Thanks, Jakub
create table t1 (a,b);
create table t2 (a,c);
insert into t1 values (1,2);
insert into t2 values (1,3);
create view myview as select t1.a a from t1 inner join t2 on t1.a=t2.a;
create table problem as select * from myview;


[sqlite] coding style

2004-12-04 Thread Mateusz Łoskot
Hello,
May be it's a kind of trivial question but I would
like to know if it is possible to get some details
about sqlite (source) coding style, some guidelines
(tabs, spaces, indentation, etc.).
I would like to follow it in my customization in some files.
Could you give me some info?
Best regards
--
Mateusz Łoskot, mateusz (at) loskot (dot) net
Registered Linux User #220771, Debian (Sarge)