Simple SQL query works in SQL server, but not in SSIS

  • IF(0 > 0 OR 0 > 0 )

    BEGIN

    PRINT 'OKAY'

    END

    That is my simple query. In SSIS it causes an error -

    [Execute SQL Task] Error: Executing the query "IF(0 > 0 OR 0 > 0 ) BEGIN

    PRINT 'OKAY' END" failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    How do I fix this ?

  • Try using SELECT instead of PRINT.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

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