SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How do you use parameters in SSIS lookup functionality


How do you use parameters in SSIS lookup functionality

Author
Message
mikelordi2
mikelordi2
SSC Veteran
SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)

Group: General Forum Members
Points: 230 Visits: 16
Hi everybody...I"m new to SSIS, a tool my company is making us use primarily as a DTS tool. What I'm trying to do is use a flat file as the input, perform transformations and pass it to a Sybase table. Where I am stuck is in addition to performing manipulations such as dates, etc, we need to update and add data from a variety of lookup tables. The problem is I need to pass parameters into the lookup as I have a one to many error if I don't.

I am trying to take the field "ReinsuranceDate" from the flat file (after converted of course) and using fields "Min_Pol_Dt" and "Max_Pol_Dt" in a lookup table called "PlanCode", add in fields from the "PLaCode" tabel to be mapped, but only where the Reinsurance Date is between the Min_Pol_Dt and Max_pol_dt.

I think I am supposed to update the SQL in the advanced tab of the lookup, but I can't figure out how to pass the field I need through. Here is the SQL from the advanced tab as is (I am matching on those three fields)

select * from
(select * from `PlanCode`) as refTable
where [refTable].[ClientCompanyCode] = ? and [refTable].[ClientTreatyNumber] = ? and [refTable].[ClientPlanCode] = ?
mikelordi2
mikelordi2
SSC Veteran
SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)

Group: General Forum Members
Points: 230 Visits: 16
I've figured this out by utilizing the Advanced Tab on the function and modifying the SQL. Thanks!
Ron Patrick-327855
Ron Patrick-327855
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 37
You might consider sharing the answer!
peterzeke
peterzeke
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5184 Visits: 1767
So, what is the answer?



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search