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)
 Problem in writing dts package

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-21 : 09:12:40
Mallesh writes "DTS Package1 Action: ONLY Appends, NO Updates
Destination Tables:
Product_group,
product_group_link,
product_group_member

Structure of affected columns in table: Product_group
Column Name Type of value Required (Y/N)
product_group_id int Y
product_group_name nvarchar Y

Structure of affected columns in table: Product_group_link

Column Name Type of value Required (Y/N)
group_link_id int Y
product_group_id int Y

Structure of affected columns in table: Product_group_member
Column Name Type of value Required (Y/N)
product_group_id int Y
acc_num nchar N

Check if there is a record in product_group table for the Parent Number (col1 in txt file)
If no, then :
APPEND a row to product_group table for the parent Number
APPEND a row to product_group_link table using the product_group_ID
generated in the step above
APPEND multiple rows to the product_group_member table (1 per accessory)
using the product_group_ID generated earlier

txt file data
col1 is Parent Number
col2 is accessory Number

1000049p,1000;1000049p,1001;1000049p,1002;1000049p,1003;833-456,2001;833-456
,2002;1000045p,3001;


For this above txt file data should be store like in

Product_group table

Product_group_id product_group_name
1 1000049p
2 833-456
3 1000045p
Product_group table

group_link_id product_group_id

1 1
2 2
3 3

product_group_member


product_group_id acc_num
1 1000
1 1001
1 1002
1 1003
2 2001
2 2002
3 3001"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-03-21 : 10:19:41
What exactly is your question?

Go to Top of Page
   

- Advertisement -