I need to merge the archive version of a transaction file and the production version of the same file without including duplicate keys. I also need to filter the records to a range of transaction dates and specific transaction codes: i.e. tsdate between 1150901 and 1160831 and tscode in ('03', '09', '13', '23', '30', '18', '21', '25', '40'). The archive file is currently 11,000,000 records (and growing), of which 200,000 meet the filter criteria. The production version is 1,000,000 records, of which 500,000 meet the filter criteria.
The key to the files is company (tsco), part number (tcpn), transaction code (tscode), transaction date (tsdate), transaction time (tstime).
The results of the merge will be used in an SQL statement that has four CTE's, so the merge can be one of the CTE's or can be created as a separate routine within the program.
I want to get this completed over the weekend, and since the weekend is nearly upon us, I'm hoping to get some suggestions/examples as I dig into writing it from scratch.
The key to the files is company (tsco), part number (tcpn), transaction code (tscode), transaction date (tsdate), transaction time (tstime).
The results of the merge will be used in an SQL statement that has four CTE's, so the merge can be one of the CTE's or can be created as a separate routine within the program.
I want to get this completed over the weekend, and since the weekend is nearly upon us, I'm hoping to get some suggestions/examples as I dig into writing it from scratch.
Comment