Greetings!
I have OpenProjects, OpenSubProjects, OpenJobs and each have an unique key
called ProjID. I want to update a backup for each based on
XtraB != client.LSOpenProjects.XtraB
So, is there a way of combining these three INSERTS into one?
ATTACH 'L:\Data\OpenJobsTool\Shared.DB.AllOpenProjs.db' AS client;
BEGIN;
INSERT OR REPLACE INTO client.LSOpenProjects
SELECT * FROM LSOpenProjects
WHERE ProjID IN
(
SELECT ProjID from LSOpenProjects
WHERE
XtraB != client.LSOpenProjects.XtraB
);
INSERT OR REPLACE INTO client.LSOpenSubProjects
SELECT * FROM LSOpenSubProjects
WHERE ProjID IN
(
SELECT ProjID from LSOpenProjects
WHERE
XtraB != client.LSOpenProjects.XtraB
);
INSERT OR REPLACE INTO client.LSOpenJobs
SELECT * FROM LSOpenJobs
WHERE ProjID IN
(
SELECT ProjID from LSOpenProjects
WHERE
XtraB != client.LSOpenProjects.XtraB
);
END;
thanks for your help.
josé
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users