August 12, 2021 at 2:54 pm
I have added a timestamp field to a table fed by an SSIS package. It is datatype 'date'. I added a variable to my SSIS package called 'TodaysDate' and assign the value through the expression '@[System::StartTime]'.
I'm stuck as to how to get the mapping changed to pass this date during the export of data from a flat file without the date to a SQL Server table needing the date.
I have a Data Conversion in the Data Flow but I don't see a place for my new field to pickup this variable.
August 12, 2021 at 3:07 pm
Ok so you have a data flow that uses a flat file as the input and a table (with date column) as the output, is that right?
If so just drag a Derived Column component into your data flow. You can add the new column here and just drag the variable from the list above into the expression field. Additionally you don't need the variable as you can put that expression directly in the derived column expression as those system variables are also available to use.
August 12, 2021 at 3:22 pm
Something really went bad in my VS 2017 SSDT. I went into the advanced editor for the derived column and VS closed, I reopened VS 2017 SSDT and now it says my Solution is incompatible.
August 12, 2021 at 3:38 pm
Gotta love SSIS/VS.
Can you roll back without loosing too much?
You could create a new project and add that package into it to see if you can open it. It's hard to say what got corrupt. Might be able to go through the xml and fix the issue there.
You can try to open the package on it's own by just double clicking the dtsx file. You may need to tell it to use VS. See if that works.
August 12, 2021 at 3:51 pm
Never mind the last crisis... fixed... and the Derived Column with just the expression worked perfectly... thanks!
August 12, 2021 at 4:05 pm
Awesome and yeah you're welcome glad I could help.
August 12, 2021 at 4:07 pm
Why not just give the column a default value in SQL Server? Perhaps you want all of the entries in the batch being process to have the same value.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply