We have several DTS packages that copy over sales history information into tables setup on the SQL server, & from there we do our reporting. The problem is that everytime the packages run we clear out the current tables, for instance (TRUNCATE TABLE Tickets), next the DTS' copy over the updated information as well as the history, again. It takes hours for these things to run. I'd like to be able to copy over just latest ticket history and not clear the table and start over each night. I'm importing the information from an IBM AS 400 (IBM DB2 for iSeries IBMDA400 OLE DB Provider) into the SQL Tables.
Here's the query:
SELECT TH_CUSTNO, TH_TICKNO, TH_TRANYR, TH_TRANMO,
TH_TRANDA, TH_PRIMRY_ROUTNO, TH_CUSTOMER_BRANCH, TH_TKTOTL,
6 as LocationId,TH_CSHCHG
WHERE TH_TRANYR = 05 or TH_TRANYR = 06
Any ideas will be greatly appreciated.