all groups > sql server dts > june 2005 >
You're in the

sql server dts

group:

Filling two tables from one source table within one transformation


Re: Filling two tables from one source table within one transformation Darren Green
6/21/2005 12:00:00 AM
sql server dts: You can only have one destination table for the DataPump task, but you
can use lookups to call separate insert statements from within an
ActiveX Script transform.

Or

Insert into one flat table, and then use regular SQL to load the data
into the final tables.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
Filling two tables from one source table within one transformation Adrian
6/21/2005 12:16:07 AM
Hi folks,

hope somebody can help me out since I am running mad on this and no book can
help!

I want to consolidate 8 adress db´s (Access,Paradox, txt ,Sybase SQL.etc) to
one big address DB on SQL Server using DTS

After importing my Source Tables look like this

tblSource:
Name
Firstname
BirthDate
Description
Street
Zip
....


My 2 destination tables which should hold all the information

tblAddress:
AddressID
Name
Name2
Street
Zip
....

1 : n Relation to

tblInfo:
ID
AddressID
Name
Info

Now I am trying to transform: Name -> Name ; Firstname -> Name2 etc.. no
Problem so far..

but I haven´t found a way to do the following :
set the relation tblInfo.AddressID = tblAddress.AddressID
tblSource.Description -> tblInfo.Info
tblInfo.Name -> "Description"


Cheers

Adrian



Re: Filling two tables from one source table within one transformation Adrian
6/23/2005 12:00:00 AM
Thats a good Idea but how do I get the Identity value from my parent row?

Thanks a lot !

Adrian

"Darren Green" <darren.green@reply-to-newsgroup-sqldts.com> schrieb im
Newsbeitrag news:BZy1MeEnw6tCFw60@sqldts.com...
[quoted text, click to view]

Re: Filling two tables from one source table within one transformation Darren Green
6/25/2005 8:33:23 PM
In message <#Rvv2SAeFHA.544@TK2MSFTNGP12.phx.gbl>, Adrian
<Adrian.Porger@gmx.de> writes
[quoted text, click to view]

Make the parent row insert through a Lookup. The lookup can be an insert
and a select, the latter for SCOPE_IDNTITY(). Make sure you SET NOCOUNT
ON in the lookup. Might be easier to wrap this in a porc through.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button