dbTalk Databases Forums  

data flow

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


Discuss data flow in the microsoft.public.sqlserver.dts forum.



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

Default data flow - 08-10-2006 , 09:14 AM






hi , i have two qustions
1. is it possible to use parameters in the data flow area of sql server
2005 dts?
if yes how?

2. how can i execute an insert command that get the values from a
global parameter - an object type taht now contains a recordset.

thanks dana


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

Default RE: data flow - 08-11-2006 , 02:41 AM






Any data you will use in the data flow has to have been sourced using the
supported sources: Flat file, Excel source, OLE DB, ADO.NET or it must be
derived from columns thus sourced or scalar variables (not object, as there
is no way to navigate object variables like recordsets within SSIS expression
language). You can use variables for the table names or SQL queries that
source the data.

If a previous task placed the data you want in a recordset, consider using
the raw file destination instead, then picking that up in your data flow. If
you are somehow restricted to using a recordset, then you have to use a
Script task to navigate that recordset yourself. Make sure you copy the
adodb.dll from the Primary InterOp Assemblies folder to your
...\Microsoft.NET\Framework\v2.0.50727 folder and add a reference in the
script.

But the best solution is not to use a recordset; the raw file transformation
is designed to pass data between components.

It all depends on your scenario, which I don't know. Another method you
could consider is using the Lookup transformation, which will look up
information that you can then insert. But the lookup (reference) table must
be stored in an OLE DB provider source.

Charles Kangai, MCT, MCDBA

"dana" wrote:

Quote:
hi , i have two qustions
1. is it possible to use parameters in the data flow area of sql server
2005 dts?
if yes how?

2. how can i execute an insert command that get the values from a
global parameter - an object type taht now contains a recordset.

thanks dana



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

Default Re: data flow - 08-11-2006 , 03:55 AM



Hello dana,

Parameters to what and to do what?

You can certainly used a parameterised SQLStatement. Do you intend to use
the parameters to redirect data flow?


A Global Parameter? Do you mean a variable?


There isn't the concept now of a global variable as variables are scoped
to containers/executables. The highest level in that chain would be the
package itself.

If you want to shred a recordset then you could look to do something like
this


Shredding a Recordset
(http://www.sqlis.com/default.aspx?59)


Allan


Quote:
hi , i have two qustions
1. is it possible to use parameters in the data flow area of sql
server
2005 dts?
if yes how?
2. how can i execute an insert command that get the values from a
global parameter - an object type taht now contains a recordset.

thanks dana




Reply With Quote
  #4  
Old   
dana
 
Posts: n/a

Default Re: data flow - 08-12-2006 , 11:20 AM



the thing is like this:
i hade a sybase DB which i have only read rights.
i need to pass the DB from one table in it to my sql server 2005,
this transformation need to take place 3 times a day
so in order to make it as efficient as possible i want to copy only
the delta each time.
so i though about making a query on my sql server 2005 for the last row
id, stored it in a global variable and then use the OLE DB source, use
the query option with a condetion on that variable.
but i could not find any way to use a query which contains a variable.

if you have a better idea it will be greate
dana.


Reply With Quote
  #5  
Old   
dana
 
Posts: n/a

Default Re: data flow - 08-12-2006 , 11:20 AM



the thing is like this:
i hade a sybase DB which i have only read rights.
i need to pass the DB from one table in it to my sql server 2005,
this transformation need to take place 3 times a day
so in order to make it as efficient as possible i want to copy only
the delta each time.
so i though about making a query on my sql server 2005 for the last row
id, stored it in a global variable and then use the OLE DB source, use
the query option with a condetion on that variable.
but i could not find any way to use a query which contains a variable.

if you have a better idea it will be greate
dana.


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

Default Re: data flow - 08-13-2006 , 06:03 AM



Hello dana,

Are you choosing SQL Command as the source data access mode?

if you do then you will see a parameters button appear


allan



Quote:
the thing is like this:
i hade a sybase DB which i have only read rights.
i need to pass the DB from one table in it to my sql server 2005,
this transformation need to take place 3 times a day
so in order to make it as efficient as possible i want to copy only
the delta each time.
so i though about making a query on my sql server 2005 for the last
row
id, stored it in a global variable and then use the OLE DB source, use
the query option with a condetion on that variable.
but i could not find any way to use a query which contains a variable.
if you have a better idea it will be greate 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.