SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS and Load Date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Van
Constraint Violating Yak Guru

458 Posts

Posted - 10/03/2007 :  09:52:18  Show Profile  Reply with Quote
I have an SSIS package that imports data. It's working fine except I've been told that the Load_Date field needs to have the same date for each record in the table (the table gets truncated and then loaded each time the SSIS package runs). I created the table with a default of getdate() for Load_Date but I've been told not to do it that way and to have a variable in SSIS to populate Load_Date to make sure it's the same for every record. I've set up a variable in SSIS. I made it a datetime type of variable. It defaults the value to the current date (at that time) but doesn't let me change it to getdate(). I think the way to use the variable is to have a derived columns step that uses the variable Load_Date and then in mappings, set the column equal to the variable. But how do I set the variable equal to getdate() so it can be used for each row?

Thanks

Edited by - Van on 10/03/2007 09:53:31

Van
Constraint Violating Yak Guru

458 Posts

Posted - 10/03/2007 :  10:13:10  Show Profile  Reply with Quote
Ok, basically what I need to know is how to set my Load_Date variable to getdate() in SSIS. I have it defined as a datetime type but it only lets me pick days off the calendar control and doesn't accept getdate() as a valid value. How do I set it to getdate()?

Thanks
Go to Top of Page

Van
Constraint Violating Yak Guru

458 Posts

Posted - 10/03/2007 :  10:20:43  Show Profile  Reply with Quote
I figured it out. It was under the properties of the variable (not in the initial set up of the variable). There's a place for Expression and then a box for "Evaluate as Expression" that you have to set to True.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000