dbTalk Databases Forums  

passing parameters

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


Discuss passing parameters in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dana
 
Posts: n/a

Default passing parameters - 08-09-2006 , 12:10 PM






i'm quite new with all ssis,
i need to transfer data from sybase to sql server 2005,
i need to perform this task cauple of time a day, therefore every time
i need to transfer only the delta. (somting like replication).
so i thought about using the ssia - data flow -
i wanted to make a query on sql server 2005 get the last row that was
updated and than make the source query on the sybase use the parmeter
retrened from the sql server 2005.
but i don't know how to do that,
can someone help me please. :-)

dana


Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: passing parameters - 08-10-2006 , 07:32 AM






Hmmm... that was easy in DTS. In SSIS? Why not try adding a linked server to
the Sybase system, then use OLE DB Source in SSIS with Data Access mode set
to SQL Command, then a SQL query like:

SELECT * FROM OpenQuery(SybaseServer, 'SELECT * FROM SourceTable')
WHERE SourceTable.PrimaryKeyCol NOT IN (SELECT PrimaryKeyCol FROM
DestinationTable)

Charles Kangai, MCT, MCDBA

"dana" wrote:

Quote:
i'm quite new with all ssis,
i need to transfer data from sybase to sql server 2005,
i need to perform this task cauple of time a day, therefore every time
i need to transfer only the delta. (somting like replication).
so i thought about using the ssia - data flow -
i wanted to make a query on sql server 2005 get the last row that was
updated and than make the source query on the sybase use the parmeter
retrened from the sql server 2005.
but i don't know how to do that,
can someone help me please. :-)

dana



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: passing parameters - 08-11-2006 , 04:14 AM



Hello dana,

Can you get an OLEDB connection to Sybase?

You can use the OLEDB Source Adapter + Connection Manager to get a rowset
from Sybase and pass in a a parameter.

If the driver does not support Parameters then you could pass in the value
for the extract statement through a variable.

You could set the variable value to be the result of an expression.

You could get the last read row value into a variable itself and use that
in the expression that defines the SQL Statement to extract from Sybase.
I would do this in an ExecuteSQL task.


Allan



Quote:
i'm quite new with all ssis,
i need to transfer data from sybase to sql server 2005,
i need to perform this task cauple of time a day, therefore every time
i need to transfer only the delta. (somting like replication).
so i thought about using the ssia - data flow -
i wanted to make a query on sql server 2005 get the last row that was
updated and than make the source query on the sybase use the parmeter
retrened from the sql server 2005.
but i don't know how to do that,
can someone help me please. :-)
dana




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.