getdate column ssis

  • Hi,

    i have a column in database that i set the datestamp using getdate(). when i load the data usin ssis it should set it to 14/08/2008 14:00:00.

    but when i do a group by i get 3 records being loaded at one second before and 3 records after.

    do you think it is something to do with ssis?

    thanks

  • Yes it is SSIS. SSIS does row by row processing so if you take 20 seconds to insert a 1000 records your date will vary. If you want the same date for the insert you can use a Derived Column Transform to add the column to your SSIS data or get the date in your source select.

  • Using the derived column, grab the value from the System::ContainerStartTime As good a time as any.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • sorry if this sounds stupid how do i get this System::ContainerStartTime ......

  • In your derived column component, you have two nodes in the left hand tree. One is variables, one is columns. Look for the System::Contrain.... one, drag and drop it into the Expression area below and there you have it: A new column which will have a time for you.

    A note though, the time you see at design time is old and stale. When you run it ti will be correct.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • nice one guys thanks. now i get same datestamp for all records

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply