Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Lookup

Posted on 2004-09-27
8
Medium Priority
?
330 Views
Last Modified: 2012-06-21
Hi,

I use this for a single input lookup:
DTSDestination("myID") = DTSLookups("lkID").Execute(DTSSource("DBNum"))

My question is, how can I code it so that it can take two parameters?  Thx
0
Comment
Question by:mcrmg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 480 total points
ID: 12164831
Make sure the lookup query accepts to parms and just code them on the execute:

DTSDestination("myID") = DTSLookups("lkID").Execute(DTSSource("DBNum"),DTSSource("value2"))
0
 

Author Comment

by:mcrmg
ID: 12165202
So, it is just like sending parameters in Source tab in ActiveX.  Everything must be in order?

ex.  Select * from myTable Where A=? and B = ?

DTSDestination("myID") = DTSLookups("lkID").Execute(DTSSource("DBNum"),DTSSource("value2"))
0
 
LVL 34

Expert Comment

by:arbert
ID: 12165287
Exactly...
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:mcrmg
ID: 12168213
I tried that, I make sure that lookup can take 2 parameters..

But I got this err:


Invalid procedure call or argument:"DTSSource"
0
 
LVL 34

Expert Comment

by:arbert
ID: 12169259
Works fine for me.  On your AxtiveX transformation,  make sure on the "source columns" tab that you have selected all the columns used for the lookup--if you only have the one column selected you will receive this error.

Brett
0
 
LVL 34

Assisted Solution

by:arbert
arbert earned 480 total points
ID: 12169267
Also, here is the MS link on the subject with some good examples :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtssql/dts_addf_misc_2dix.asp


Brett
0
 

Author Comment

by:mcrmg
ID: 12169982
Thanks...got that
0
 
LVL 34

Expert Comment

by:arbert
ID: 12170018
Good deal!

Brett
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question