Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 beginner advice on setting up this DTS job

Author  Topic 

noxipoo
Starting Member

3 Posts

Posted - 2006-07-17 : 09:47:03
os: 2000 server
sql: 2000
I am looking into setting up an import job from multiple tab files into 1 database. They are employee records and it will be imported nightly into an emplyee table. I'm thinking about using DTS job to parse all the files (some are employee records, some are location, some are contact info, etc) and then merging into 1 table and then using UPDATE to copy over to the production table. Can this be done so that for each record it comes across, it will match the employee number and then overwrite all of that employees records with the new info? also, if the employee number doesn't exist to copy over as well.

The problem with just a straight table copy is that there are records with no employee numbers or numbers that are in production but not in the import, but they need to be kept.

Thanks for any ideas.

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2006-07-17 : 17:56:41
Is there any reason why you can't keep the data in separate tables, then using a view or stored proc to display it?
It will make the update process easier.

To tackle your problem, I would first create the DTS to import the files into temporary staging tables. Then I would create a series of view/stored procs that implement your various business rules. You can then incorporate a call to these stored procs in your DTS package so it's easier to administer.

Just a thought.

Go to Top of Page

noxipoo
Starting Member

3 Posts

Posted - 2006-07-18 : 13:43:11
the table is accessed by a 3rd party program that can't be changed. I will setup some test tables. thanks.
Go to Top of Page
   

- Advertisement -