If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Problem with ssis variables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-12, 18:45
h.singh10 h.singh10 is offline
Registered User
 
Join Date: Dec 2011
Posts: 13
Problem with ssis variables

Hi all

I am trying to capture sysdate in a variable and then use this variable further in the package.

I have one execute sql task which is connected further to data flow task.

In execute sql task:

Insert into logging (sysdate)

Now after that in data flow task, i am using a oledb source which extract data from oracle.

select * from table1 where timestamp between max(tmstp) and sysdate.

I dont want sysdate in the above query as it changes every second. I want to get the same sysdate that was used in execute sql task fro logging purpose. Can we store that value in a variable and if so, can we use it the above query.

Thanks

Harjinder
Reply With Quote
  #2 (permalink)  
Old 01-06-12, 21:33
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
I haven't tinkered with SSIS in a wee while and don't have a copy to hand but I can point you in the right direction to get you started.

Under the SSIS menu there is an option titled Variable

You'll need to create a new variable and set the scope to package level or global level (whichever you feel is most appropriate).

Then have a google around for ways to set and use SSIS variables.

HTH
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On