Solved

Lookup

Posted on 2004-09-27
8
328 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 120 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
Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

 

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 120 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

689 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