I have a database (*.db3) with 3 tables:

CREATE TABLE TB_Signature (Filename TEXT, FileSignature TEXT, FileSize
INTEGER, FileDate INTEGER, PRIMARY KEY (FileSignature,FileSize));

CREATE TABLE TB_FileRecords (pszFilename TEXT PRIMARY KEY, nFileSize
INTEGER, nFileSignature TEXT);

CREATE TABLE TB_SignatureRecords (nFileSignature TEXT PRIMARY KEY, nFileDate
INTEGER );

I want to merge the bottom two tables, TB_SignatureRecords & TB_FileRecords,
into the top one, TB_Signature so that:
   
   from TB_SignatureRecords: 
nFileSignature goes to 2nd column in TB_Signature
nFileDate goes to 4th column in TB_Signature

   from TB_FileRecords:
pszFilename goes to 1st column in TB_Signature
nFileSize goes to 3rd column in TB_Signature

When done I would delete TB_SignatureRecords and TB_FileRecords.

How would I do this? TIA!!

p.s.  I know that I can copy the values from TB_SignatureRecords into
TB_Signature using the following command:
insert into TB_Signature select "",nFileSignature,0,nFileDate from
TB_SignatureRecords; 
   and delete the tables when done by:
Drop table TB_FileRecords;
Drop table TB_SIgnatureRecords; 


-- 
View this message in context: 
http://www.nabble.com/Novice-Question-about-SQLite-Insert-Command-tf2572155.html#a7170512
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to