Solved

Lookup

Posted on 2004-09-27
8
322 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
Comment Utility
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
Comment Utility
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
Comment Utility
Exactly...
0
 

Author Comment

by:mcrmg
Comment Utility
I tried that, I make sure that lookup can take 2 parameters..

But I got this err:


Invalid procedure call or argument:"DTSSource"
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 34

Expert Comment

by:arbert
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks...got that
0
 
LVL 34

Expert Comment

by:arbert
Comment Utility
Good deal!

Brett
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MSSQL 2014 Query Synthax 8 36
Granting access to Microsoft SQL Server 17 25
sql query 7 34
Sql Stored Procedure 26 27
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now