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.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

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