SSIS Cast column in SQL Command Text (OLE DB Source)

  • I am trying to cast a column using the SQL Command option in the OLE DB Source Editor. I am pulling from a table that has NVARCHAR(MAX) as the data types. This data happens to have a lot of strange characters, so I am trying to cast these columns in my select, but I keep getting the same error... "Unable to convert Unicode to Non-Unicode types".

    Can I actually do this in the OLE DB Source Select?

    SELECT

    cast([DS] as varchar(2000)) COLLATE Latin1_General_BIN2 as DS

    ,cast([LEAD_NOTES__C] as varchar(2000)) COLLATE Latin1_General_BIN2 as LEAD_NOTES__C

    FROM TABLE

    Thank you all in advance for your responses 🙂

    Everyone has a plan until they get punched in the mouth. --Mike Tyson

  • Why don't you use the Data Conversion transformation in SSIS?

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

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