![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Fail |
#2
| |||
| |||
|
|
Iam a newbie...i'll really appreciate if somebody can provide a solution with code examples... I have a situation like this... I get my data in a text files (tab delimited) an then using DTS I need to populate a SQL server 2000 database. The question is: How can I split a source row of data and load multiple destination tables in the same step? For instance if the source row has information like this... 6/7/2004|999-99-9999|FirstName|LastName|MiddleName|Address|English |PASS|Math |Fail I need to insert above info into two tables Correspondence & Score Table correspondence id_corr SSN First Name Last Name Middle Name Address Table Score id_Corr subject result Please note id_corr is primary key for table correspondence and foreign key for score table. I have my dts transform data task activex script like this DTSGlobalVariables("mIDCorr").value = maxIDCorr DTSDestination("id_corr") = maxIDCorr DTSDestination("ssn") = DTSSource("Col002") .... If DTSSource("Col010") = "PASS" Then SQL = "Insert into km_stage_score (id_corr,subject,result) " & _ " values ('" & maxIDCorr & " ',' " & DTSSource("Col012") & " ',' " & DTSsource ("Col011") & "' " Conn.Execute SQL End If The problem is ...Insert sql does not work..if i remove this DTS runs without any error. Please help. Krish |
![]() |
| Thread Tools | |
| Display Modes | |
| |