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.
| Author |
Topic |
|
jigsatics
Starting Member
18 Posts |
Posted - 2005-12-12 : 18:42:14
|
| Hi!I'm trying to setup a DTS that reads a flat file uses a Data Driven Query task and then selects ONLY records that does not exist in the database and then INSERT them to DB1. This works fine but I need to add another functionality. I need to create a record on another table(DB2) based on the freshly inserted records in DB1 using only some of the fields. How do I do it? Is setting up a trigger possible so that everytime a record is inerted in DB1 it will automatically a populate DB2?Flat file:IDNamePhoneDB1IDName PhoneDB2IDPHoneEvent (from 00 to 10)NumActions (initialized to 0)Please help.Thanks.$3.99/yr .COM!http://www.greatdomains4less.com |
|
|
SreenivasBora
Posting Yak Master
164 Posts |
Posted - 2005-12-15 : 10:33:47
|
| Write a trigger on database DB1 of Table T1 to Insert the new records into Databse DB2 of Table T1.Capture new records from magic tables Inserted and updated data from Deleted (If required).:-)With RegardsBSR |
 |
|
|
jigsatics
Starting Member
18 Posts |
Posted - 2005-12-15 : 10:36:37
|
| Thanks. That solved it!$3.99/yr .COM!http://www.greatdomains4less.com |
 |
|
|
|
|
|