question

junioeddev avatar image
junioeddev asked

SSIS Pass null value through Execute SQL task

UPDATE Addresses SET CountyCode = Null, UPDATED_TIME = ?, UPDATED_BY = ? WHERE (Country = ? AND Town = ?) AND CONVERT(VARCHAR(10),CREATED_TIME,112) = '20140602' Can someone please tell me why the above code is failing to execute from my SSIS Execute SQL Task Component. I have a countyCode column (INT) and I want to set it null but somehow the SSIS does not like the code above. I have an int variable in my SSIS package but it does not allow null values and so defaults to 0 but I don't want to pass a 0 value as 0 is used for something else. is there a way I can pass a null value with using a store proc or ideally no use a transformation component
ssisnullvariableexecute-tsql-task
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
testuser avatar image
testuser answered
When you say that the code is failing to execute, do you mean that there is a run-time error, or that CountyCode, UPDATED_TIME and UPDATED_BY do not have the expected values after the task executes?
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.