question

Pat Rogers avatar image
Pat Rogers asked

Automatically convert Unicode Strings to Regular Strings

Is there a way in SSIS 2008 to automatically convert Unicode strings to regular strings? Is there perhaps a package setting or something?

I am reading several Jet datbases and all the string fields are coming across as Unicode Strings and the destination table they are being inserted into are defined as regular strings.

I don't want to create a data conversion transformation for every string field in all these tables I'm importing.

I'm just hoping there is a property that states to treat unicode as the default code page of 1252.

Thanks,

Pat Rogers

sql-server-2008ssisunicodedata-conversionjet
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
Bob Hovious avatar image
Bob Hovious answered

Perhaps I am missing something, but as long as you aren't using characters that require Unicode, nothing prevents you from assigning the values to "standard" columns or variables. The implicit conversion is done for you.

declare @source as nvarchar(100)
declare @target as varchar(100)

set @source = 'Paradimethylaminobenzaldehyde'
set @target = @source

select @Target as [@Target], @source as [@source]
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.