| allan@no-spam.sqldts.com 2006-01-29, 3:23 am |
| Hello SteveS,
When you say SET do you mean UPDATE?
If you do then you could use lookups through an ActiveX Transform
http://www.sqldts.com/default.aspx?277
If not and you simply want to check the valkue in the file as it is coming
through and set the value in the destination accordingley then again you
can use an Active Script transform and check the vaue in the column i.e.
IF DTSSource("Column Name") = "Hello" THEN
DTSDestination("Column Name") = "This value"
END IF
Or
you can simply import the file into a staging table AS IS and then use TSQL
to do the manipulation when inserting
INSERT........
SELECT
CASE WHEN ColumnName = "Hello" THEN "This Value" ELSE ColumnName END
as Val,
....
Allan
> Given:
> I'm using a DTS Package to import data into a table. Each row from a
> text
> file gets placed into a corresponding table.
> What I need to do:
> I'd like to modify the DTS Package to change the data saved to a table
> based
> on values in the records from the text file. In otherwords,
> if a value from the text file > 150 then set a value in the table to
> 1...
> if a value from the text file < 150 then set a value in the table to
> 2.
> Question:
> How do I do this?
|