Solved

Lookup

Posted on 2004-09-27
8
324 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Live Storage Vmotion VMs with shared VMDK 10 59
2016 SQL Licensing 7 41
VB.net and sql server 4 36
SQL Query Help Top 1 and Distinct? 6 26
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

777 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