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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to select multiple fields in a Lookup?

Status
Not open for further replies.

rodeomount

Programmer
Sep 25, 2007
50
US
Is it possible to run a select statement to return more than one field in a select statement inside a dtsLookUp?


Ex place the following statement in a Lookup

Select Field1,Field2 from TableA where something = ?
 
I believe so. Try something like the following code as a VB Script within an ActiveX Script transformation:

Code:
	Dim i, myResult, strSomething
	
	strSomething = "Y"
	i = 0
	myResult = DTSLookups("Query_TableA").Execute(strSomething)
	If IsEmpty(myResult)= False Then
		For i=0 to 2
		   	If trim(myResult(i)) = "X" Then
			       Exit For
		   	End If
		Next		
		i = i + 1
	End If

Hope it helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top