Hello,

I have included a C++ file which will compile against SQLite 3.2.1 under
Visual C++ 7 in Windows (it is almost C, and only has one Win32 Api call
- to sleep at the end).  I would be grateful if somebody who has
experience using these column name pragmas could take a look and see if
either:

(a) This documentation is incorrect:
http://www.sqlite.org/cvstrac/wiki?p=ColumnNames

(b) I am not using SQLite correctly.

Here are my results:

CREATE TABLE TEST1 (id NUMERIC, data VARCHAR2);
CREATE TABLE TEST2 (id NUMERIC, data2 VARCHAR2);

Query = "SELECT T1.*, T2.* FROM TEST1 T1, TEST2 T2 WHERE T1.id = T2.id;"

Short=OFF, Full=OFF
Column 0: id
Column 1: data
Column 2: id
Column 3: data2
This should be the same as the third scenario, as my query is a join
involving two tables.

Short=ON, Full=OFF (default, but set anyway)
Column 0: id
Column 1: data
Column 2: id
Column 3: data2
This is as expected from the docs.

Short=OFF, Full=ON
Column 0: id            - should be T1.id
Column 1: data          - should be T1.data
Column 2: id            - should be T2.id
Column 3: data2         - should be T2.data2
This is wrong, according to the documentation. These strike me as more
of what I would expect had I run the query: SELECT * FROM TEST1 T1,
TEST2 T2 WHERE T1.id=T2.id.

These clearly do not match the documentation. Also, the documentation
example does not provide the core comparison case of a query joining two
or more tables.

I would really appreciate help on this if anyone can spare the time. I
need to either move to SQLite 3 or find an alternative.  I cannot move
to SQLite 3 if I cannot replicate the behaviour of SQLite 2, even with
pragmas.

Many thanks,
Steve



-----Original Message-----
From: Drew, Stephen 
Sent: 03 May 2005 15:49
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Pragmas

Understood.

I fall into case 5, and this is definitely not the way they're
represented. So assuming my code was correct, and the documentation
refers to 3.2.1, the documentation is STILL incorrect?

Regards,
Steve 

-----Original Message-----
From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
Sent: 03 May 2005 15:26
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Pragmas

On Tue, 2005-05-03 at 15:09 +0100, Drew, Stephen wrote:
> This is not the case for the version of SQLite 3.2.1 I am using.   Is
> the documentation incorrect, or am I doing anything wrong?
>    

Documentation is wrong.  See http://www.sqlite.org/cvstrac/wiki?
p=ColumnNames
--
D. Richard Hipp <[EMAIL PROTECTED]>



Reply via email to