Can someone give me a sql script please

Hi

I have a current database and an old one, I need to be able to take a date range of records in the journal table in the old database and insert them in the new database journal tabe without affecting those records that are already there.

I know the basic syntax of the script will be something like...

insert xxx from olddb to newdb where date xxx

but don't know what exactly to write. Any help greatly appreciated.

Reply to
Gaz
Loading thread data ...

hi Gaz, run this: insert into targetdb.dbo.journal (storeid,time,transactiontype,referenceid,cashierid,customerid,orderhistoryid,batchnumber,receipttext,compressed,receiptcompressed ) SELECT storeid,time,transactiontype,referenceid,cashierid,customerid,orderhistoryid,batchnumber,receipttext,compressed,receiptcompressed FROM sourcedb.dbo.journal where Time>='2007-01-01' and Time Hi

Reply to
Akber Alwani

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.