June 15, 2005 at 9:58 am
I have a source text file that has an Ebcdic character at then end of each of several amount fields.
Is there anyway to dynamically get the name of the DTSSourceColumn in a vbscript when a transformation runs so I can pass it as a parameter with my sub call?
I would like to create a sub that accepts parameters for EBCDIC code, dtssourcecolumn name, and dtsdestinationcolumn name so I can resuse the code on each amount field in the file I need to convert. (rather than repeating the same Ebcdic conversion for each field)
Thanks in advance!
Mel
June 17, 2005 at 2:51 am
It is very flaky trying to change the data pump task properties at runtime and very difficult to do, if at all.
To do what you want, you will have use sql dmo to create the package from a script each time it runs. You can then pass the parameters for the task each time as a function.
For what you want this is probably overkill.
Only suggestion I can make is to copy the whole text file into a staging table.
You can then create a stored procedure to copy across a column from the staging table into your live table by passing in the source and destination columns and using dynamic sql. Not ideal, but will make life a little easier.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply