Hi,
I get a strange result using JOIN on one very simple application using
SQLite.
I have made one Win32 custom application (made with MS Visual Studio 6)
using sqlite3.dll rel. 3.7.2.
On my situation I have three table like follow.
Table CODE made with:
CREATE TABLE CODE (CODE TEXT DEFAULT '',VALUE TEXT DEFAULT '');
Table JOB made with:
CREATE TABLE JOB (CODE TEXT DEFAULT '',NUM INTEGER DEFAULT 0);
Table ELAB made with:
CREATE TABLE CODE (CODE TEXT DEFAULT '',VALUE TEXT DEFAULT '');
The table CODE are populated by INSERT query with the follow data:
CODE;VALUE;
61311;18462F;
61311;18461F;
The table JOB are populated by INSERT query with the follow data:
CODE;NUM;
61311;1;
61311;1;
The table ELAB are populated with the follow SQL query:
INSERT INTO ELAB SELECT CODE.* FROM JOB JOIN CODE ON CODE.CODE=JOB.CODE
and I take the follow result.
CODE;VALUE;
61311;18461F;
61311;18462F;
61311;18461F;
61311;18462F;
That is the problem.
But I should have this result
CODE;VALUE;
61311;18462F;
61311;18461F;
61311;18462F;
61311;18461F;
I take the right result performing the same SQL command using other
SQLite based Win32 application like SQLiteAdmin or SQLiteMan.
Where is my error ?
Thanks in advance.
Stefano
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users