![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Howdy all. Im wondering if theres a way to do the following: Source .txt file; col1 col2 col3 col4 Destination table1; IDCol Identity column col1 col2 Destination table2; IdCol value from table1 col3 col4 The problem is getting the ID value for table2 I can use either a Global Variable or a Lookup Value but the problem is that it will only pass back one value. How do I insert one row to table1, get the Id, insert 1 row into table2 including that Id... and so on? TIA, Chris |
#3
| |||
| |||
|
|
Insert the col1 and col2 into table1 in one datapump Whats a datapump? |
|
For table2 load then you compare the col1 and col2 values in table1 with those in the text file and load the appropraite identity value from a lookup. |
|
-----Original Message----- How about Insert the col1 and col2 into table1 in one datapump For table2 load then you compare the col1 and col2 values in table1 with those in the text file and load the appropraite identity value from a lookup. -- -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:03f301c3b910$a2cfab80$a101280a (AT) phx (DOT) gbl... Howdy all. Im wondering if theres a way to do the following: Source .txt file; col1 col2 col3 col4 Destination table1; IDCol Identity column col1 col2 Destination table2; IdCol value from table1 col3 col4 The problem is getting the ID value for table2 I can use either a Global Variable or a Lookup Value but the problem is that it will only pass back one value. How do I insert one row to table1, get the Id, insert 1 row into table2 including that Id... and so on? TIA, Chris . |
#4
| |||
| |||
|
|
Insert the col1 and col2 into table1 in one datapump Whats a datapump? For table2 load then you compare the col1 and col2 values in table1 with those in the text file and load the appropraite identity value from a lookup. Now Im really lost. The identity value doesnt exist in the text file so I cant compare the tables to it. Am I missing something? -----Original Message----- How about Insert the col1 and col2 into table1 in one datapump For table2 load then you compare the col1 and col2 values in table1 with those in the text file and load the appropraite identity value from a lookup. -- -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:03f301c3b910$a2cfab80$a101280a (AT) phx (DOT) gbl... Howdy all. Im wondering if theres a way to do the following: Source .txt file; col1 col2 col3 col4 Destination table1; IDCol Identity column col1 col2 Destination table2; IdCol value from table1 col3 col4 The problem is getting the ID value for table2 I can use either a Global Variable or a Lookup Value but the problem is that it will only pass back one value. How do I insert one row to table1, get the Id, insert 1 row into table2 including that Id... and so on? TIA, Chris . |
![]() |
| Thread Tools | |
| Display Modes | |
| |