How to copy from one table to another database? (Whether it exists or not i also need to insert records inside)??
the script below only allow me execute 1 time. If i need to insert the new records inside the same table, how it can be done?
SELECT HOURLY_OUTPUT.*
INTO DB_ARCHIVE.dbo.HOURLY_OUTPUT
FROM HOURLY_OUTPUT
WHERE dateadd(day, 0, datediff(day, 0, DT))< dateadd(day, 0, datediff(day, 0, dateadd(day, -60, getdate())))
hope you all can guide me. thanks
the script below only allow me execute 1 time. If i need to insert the new records inside the same table, how it can be done?
SELECT HOURLY_OUTPUT.*
INTO DB_ARCHIVE.dbo.HOURLY_OUTPUT
FROM HOURLY_OUTPUT
WHERE dateadd(day, 0, datediff(day, 0, DT))< dateadd(day, 0, datediff(day, 0, dateadd(day, -60, getdate())))
hope you all can guide me. thanks