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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-06-10 : 08:20:56
|
| marcus writes "am using a dts package to move data from a .txt file to a data table. In that file, there are two columns of information that I need to combine into one column in the table. here is an example:col1 col2xyz123 <null>xyz234 <null><null> abc333<null> abc757If every instance, if there is a value in column 1 there will be a <null> in column 2. The same is true in the reverse. I want the data in the table after the move to look like this:combinedcolumnxyz123xyz234abc333abc757However, when I do the transformation, the package appends the word null to the field. so my actual data looks like this:actualxyz123nullxyz234nullnullabc333nullabc757Here is the activex script://**********************************************************************// Java Transformation Script//************************************************************************// Copy each source column to the destination columnfunction Main(){ DTSDestination("CLO") = DTSSource("Col009") + DTSSource("Col010"); return(DTSTransformStat_OK);}Help!! Marcus." |
|
|
dhw
Constraint Violating Yak Guru
332 Posts |
Posted - 2004-06-10 : 14:51:11
|
| I generally use vb for my DTS scripting...but I have successfully used IF/ENDIF block for this type of data, and it works great. |
 |
|
|
|
|
|