In my DTS transformation, I am trying to use the contents of one of the other fields of my source table to determine the outcome of my destination field using a DTS lookup. I need to use the DTSSource("company"
in the DTSDestination("company"
, but if another field in that table is a certain value, I need the DTSDestination("company"
to be the "company & ZZ". Is using the lookup the best way to go about this? I can't seem to get it to work.
My transformation activeX script looks like this:
**************************************************
If DTSLookups("Lookup Base"
.Execute(DTSSource("company"
.Value) = "Base" then
DTSDestination("Company"
= DTSDestination("Company"
Else
DTSDestination("Company"
= "ZZ-" & DTSDestination("Company"
End If
Main = DTSTransformStat_OK
*******************************************************
and my lookup query looks like this:
******************************************************
SELECT base
FROM ess_AllData_tbl
WHERE (company = ?)
******************************************************
My transformation activeX script looks like this:
**************************************************
If DTSLookups("Lookup Base"
DTSDestination("Company"
Else
DTSDestination("Company"
End If
Main = DTSTransformStat_OK
*******************************************************
and my lookup query looks like this:
******************************************************
SELECT base
FROM ess_AllData_tbl
WHERE (company = ?)
******************************************************