Hi,
I am creating a DTS package that loops through and imports 2 types of text files (5 of Type 1 and then 5 of type 2) to the same staging table using a single data pump but hit problems when I reach the 2nd file type as 4 of the source column names are not the same as the first file type.
I am able to define global variables and set the source filename OK but the actual transformation fails with an error like
'Source Column "Invoice Number" can not be found'
Here is a snippet of the ActiveX transformation that I am using...
I thought this would be enough but do I some how have completely re-map source columns as well?
I guess worst case I could duplicate all the steps and run the 2 completely separately but wanted to try an reuse steps if possible.
Any Help would be much appreciated..
I am creating a DTS package that loops through and imports 2 types of text files (5 of Type 1 and then 5 of type 2) to the same staging table using a single data pump but hit problems when I reach the 2nd file type as 4 of the source column names are not the same as the first file type.
I am able to define global variables and set the source filename OK but the actual transformation fails with an error like
'Source Column "Invoice Number" can not be found'
Here is a snippet of the ActiveX transformation that I am using...
Code:
'These Column names are same in both file types
DTSDestination("ProductCode") = DTSSource("ProductCode")
DTSDestination("OrderUnit") = DTSSource("OrderUnit")
'These Column names differ
IF DTSGlobalVariables("LoopCounter").Value < 6 THEN 'e.g 1st file type
DTSDestination("InvoiceNumber") = DTSSource("InvoiceNumber")
Etc…
Etc..
ELSE 'e.g 2nd file type
DTSDestination("InvoiceNumber") = DTSSource("CreditNumber")
Etc…
Etc..
END IF
I thought this would be enough but do I some how have completely re-map source columns as well?
I guess worst case I could duplicate all the steps and run the 2 completely separately but wanted to try an reuse steps if possible.
Any Help would be much appreciated..