dbTalk Databases Forums  

passing parameter in to OLE db source in SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss passing parameter in to OLE db source in SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
t2581@hotmail.com
 
Posts: n/a

Default passing parameter in to OLE db source in SSIS - 10-16-2006 , 12:42 PM






Hi,
I trying to pass ineteger varialble to sql statement in ole db source
located inside data floor task
of SSIS

example

select cusomername from customers where customerNo =?

I can map parameter, to my variable but during execution, values
assigned to customerNo is
always the same

select cusomername from customers where customerNo = @P1',1

BUT

it work fine with "Execute sql task "when I try to execute same query
with parameter

I run profiler and noticed difference
-----------------
for SQL OLE db source RPC completed

--variable value = 5000

declare @p1 int
set @p1=1
exec sp_prepare @p1 output,N'@P1 bigint'
select cusomername from customers where customerNo = @P1',1
--------------

for SQL Exec task
--variable value = 5000

exec sp_executesql N' select cusomername from customers
where customerNo @P1',N'@P1 nt',5000

What is correct way to pass parameter to OLE db source query ?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.