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.
Author |
Topic |
Van
Constraint Violating Yak Guru
462 Posts |
Posted - 2007-10-03 : 09:52:18
|
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 |
|
Van
Constraint Violating Yak Guru
462 Posts |
Posted - 2007-10-03 : 10:13:10
|
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 |
|
|
Van
Constraint Violating Yak Guru
462 Posts |
Posted - 2007-10-03 : 10:20:43
|
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. |
|
|
|
|
|