why does SSIS explicitly collate statements?

  • I am using SSIS (2012) to transfer data between two tables. The source and destination table has the same collation (for all columns): SQL_Latin1_General_CP1_CS_AS

    However if you look at the statements SSIS produces is uses a collate for all "string" fields

    1) select column_name collate SQL_Latin1_General_CP1_CS_AS, ....

    2) insert bulk table (column_name datatype collate SQL_Latin1_General_CP1_CS_AS, ....)

    Can anyone explain why SSIS does this?

    Does SSIS always do this when a collation differs from the SSIS collation?

    Can this somehow be avoided? Are there good reasons for avoiding it?

  • If you are selecting to connect to a table in the OLE DB (or ADO) Source, try use a SQL Command instead and build the SQL yourself without the collate.

    Not sure why SSIS is doing this, it might have something to do with the driver.

    Thomas

    Thomas LeBlanc, MVP Data Platform Consultant

  • I am using a SQL command but SSIS changes the statement (I have captured the statement from a trace).

  • I have never seen that happen, so I am not sure why.

    Sorry,

    Thomas

    Thomas LeBlanc, MVP Data Platform Consultant

  • And I need to use a destination table so that would not fix the insert statement.

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

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