Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Fetch the Incremental data using SSIS Variable

Author  Topic 

kond.mohan
Posting Yak Master

213 Posts

Posted - 2012-09-12 : 03:11:38

Dear all
we are Fetching the data from oracle(source) to sql server(destination)
we want to Fetch the data from using ssis Varible To assign the Table Columns .
how to Fetch the Incremental data using ssis varible.
how to assign table column to ssis variable



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-12 : 11:33:01
ssis variable to assign column?

sorry that doesnt make much sense to me
can you explain your full scenario?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kond.mohan
Posting Yak Master

213 Posts

Posted - 2012-09-17 : 06:40:58
Hi vishak,

thanks for your reply.

My source database is ORACLE and having Huge amount of data more than 30 crore.my destination database is MSSQL SERVER.On daily basis i need to load the data from source to destination.
My question is i want fetch the incremental data based any kind of processing on Daily basis becoz every day i am taking full load(using SSIS PACKAGE ONLY SOURCE AND DESTINATION loading the data from source to destionaion) my process(Throug sql agent job) is taking more than 6 hrs.

we need to load the data on based on Datetime column incremental records is there any way explain me

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-17 : 11:27:18
yep there's

use a variable as source query for your oracle

For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date

ie suppose each day you want to get previous days data

you can use query string like

"SELECT col1,col2,... FROM YourTable WHERE datefield >= '" + (DT_WSTR, 30) DATEADD( "d",-1,(DT_DBDATE) @[System::StartTime]) + "'"

inside the expression for the variable in its properties window

then use SQLcommand from variable option for Oracle source and map it to this variable to build query dynamically for getting incremental data from previous day

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kond.mohan
Posting Yak Master

213 Posts

Posted - 2012-11-01 : 02:09:35
Dear visha

provide the way how to do this step
For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-01 : 09:48:42
quote:
Originally posted by kond.mohan

Dear visha

provide the way how to do this step
For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date



select the variable and click the properties icon from the top and you'll be provided with properties window on right

inside that you can set your expression

ie like


"SELECT col1,col2,... FROM YourTable WHERE datefield >= '" + (DT_WSTR, 30) DATEADD( "d",-1,(DT_DBDATE) @[System::StartTime]) + "'"


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -