Use System::StartTime as input parameter to UPDATE statement in execute SQL task
Environemnt: SSIS 2008 R2 (VS 9 BIDS) on Windows 7 Ultimate I am having a having a painful time just trying to get System:StartTime into a n Execute SQL task. I have: update dbo.<TableName> set <DateTimeColumnName> = ? where <columnX> = '<theFilter>' I have tried all of the datetime related types for the System::StartTime parameter, but it won't update the column to anything other than 1/1/1900. thanks, -Peter
March 19th, 2012 4:30pm

What is the error? Try the following: DECLARE @startTime DATETIME = ?; update dbo.<TableName> set <DateTimeColumnName> = @startTime where <columnX> = '<theFilter>'; MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
March 19th, 2012 6:09pm

Are you setting the data type of the parameter to Date? For some crazy reason this is actually datetime.Russel Loski, MCT, MCITP Business Intelligence Developer and Database Developer 2008
March 19th, 2012 7:59pm

I've actaully seen this happened before. Verify that the connection manager for the Execute SQL Task is ADO.Net and not OLEDB and it should work. - FrancisFrancis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends
Free Windows Admin Tool Kit Click here and download it now
March 19th, 2012 10:09pm

I've actaully seen this happened before. Verify that the connection manager for the Execute SQL Task is ADO.Net and not OLEDB and it should work. It should also be perfectly possible with OLEDB, so I'm guessing probably a datatype mismatch.MCTS, MCITP - Please mark posts as answered where appropriate.
March 20th, 2012 2:04am

Thanks, Russ. I thought I had tried all of the different data types, but this one (DATE) did the trick. I should mentione that the connection manager I am using in OLE DB. I imagin that the answer regarding switching to ADO.Net might also work, but this one was less invasive. Thanks again! -Peter
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2012 11:28am

Peter, please change the threat type so we could mark a reply as an answer.Arthur My Blog
March 21st, 2012 11:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics