Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2006-12-06 : 07:57:24
|
This may be a simple question, but I've had the good fortune (?) until now of not having ad to do anything with DTS. Unfortunately, that has changed, and now I need to find out how to modify a DTS package.The packages has 3 file being imported into a common table. The files have the same format. I need to modify the data pump so that in addition to the file to column mappings, a literal value will be inserted into the final Recordtype column on the table (types being A for Additonal, D for Delete and U for Update).I've done a search and can't find a decent description to do what I'm sure is probably straight forward task.So review:----------- ----------|TEXT File| | table |----------- ----------|Col1 |----->|Col1 ||... | |.... ||ColX | |ColX |----------- |A/D/U | <----- how best to get this inserted during the data pump? ---------- What is the best way to*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2006-12-07 : 03:22:09
|
What I've managed to do so far is to add a new transformation, and in ActiveX do the following:'**********************************************************************' Visual Basic Transformation Script'************************************************************************' Copy each source column to the destination columnFunction Main() DTSDestination("RecordType") = "D" Main = DTSTransformStat_OKEnd Function Isn't there a better way? This (in my current layman understanding) means that activeX script will run for EVERY row in my file?*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
|
|
|
|
|