January 25, 2007 at 8:22 am
I am trying to figure out the best way to add new records to some tables on a weekly basis. The original data will all be transfered from an AS/400 db2 system. Once all the current data has been transfered over I will need to add new records from the AS/400 to my sql 200 tables. Can any one suggest a good way of doing this?
Thanks
January 25, 2007 at 9:16 am
John
Set up your AS/400 server as a linked server and then create a job to copy data to your table weekly. Or create a DTS package to do the same thing. I've never used AS/400 so I don't know whether the driver that you need to connect to it comes with SQL Server or whether you need to download and install it.
John
January 25, 2007 at 9:52 am
Is the question about how to physically do the INSERT ?
Or is the question around how to schedule this ?
January 25, 2007 at 9:53 am
I installed the AS/400 DB2 ODBC driver in a previous job.
As John mentioned, Linked Server or DTS work just as well as each other. We used a lot of DTS becuase of the our needs to manipulate the data.
January 25, 2007 at 8:41 pm
my question, is it better to just delete the whole table ever week or insert the new records? if insert is the best way, would assigning a flag (read/unread) be the best method?
January 26, 2007 at 2:09 am
John
Best just to insert the new records. Is your data date-stamped? If so, you can write your insert query based on the date. If not, you will indeed need some kind of flag system.
John
January 26, 2007 at 2:38 am
I'd say it depends on how many records there are in the source database, and what the purpose of the sql server system is. If there aren't many records, and you're just taking a copy of the data (say, for datawarehousing, or some read-only purpose), then you could just truncate and reload the whole lot every week. I've done it that way before now and it's better than creating something that's more hassle than it's worth.
Chris
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply