More thanks, I understand that but why the same query, with the same data, return two different result using different SQLite-based Win32 applications ?
In any case how I can take the result I need ? I not have other column right for made one ORDER BY and I need to respect the sequence or CODE table like The table CODE. CODE;VALUE; 61311;18462F; 61311;18461F; The table JOB CODE;NUM; 61311;1; 61311;1; Table ELAB with desired result. CODE;VALUE; 61311;18462F; 61311;18461F; 61311;18462F; 61311;18461F; Any idea ? Stefano On 07/22/2011 02:08 PM, Jay A. Kreibich wrote: > On Fri, Jul 22, 2011 at 09:23:36AM +0200, Sintoni Stefano (GMAIL) scratched > on the wall: >> Hi, >> I get a strange result using JOIN on one very simple application using >> SQLite. >> 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; > In SQL terms, these are the exact same. Table rows are *unordered* > and can be returned in any order the database wants. > > If you need a result in a specific order, you must use an ORDER BY > clause in your SELECT statement. > > -j > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users