Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Lookup

Status
Not open for further replies.

nuVBer

Programmer
Jul 6, 2001
63
US
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 = ?)
******************************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top