Search code examples
ssisbids

SSIS Expression Task functional however, not working in header


I am trying to grab the date, and I have the expression working and returning the date.

I use an expression task to evaluate the date and set it to a Date variable, (I have now changed this so that the header date is evaluated inside the variable expression and not as a separate task)

I use this in a flat file header portion and I include the variable inside of closed square brackets. when I run the package--the variable name is returned.

I thought before that I was seeing it correctly calculate I guess my real question is why isn't this putting down the value, as I remember from the past you could use a variable inside of the header.

(i've also tried using [HeaderDate] [@User::HeaderDate] [HeaderDate] to no avail.)

Can anyone explain this behavior?

enter image description here


Solution

  • So, I have messed with this quite a bit now and I have solved the problem. It is possible to dynamically modify the header but you cannot do it inside of the flat file destination header.

    You have to modify it inside of the data flow task expression.. So: if you go to expressions you should be able to find the [Flat File Destination] . [Header]. and use this to set the value for this property dynamically.