how to update nvarchar using variable

  • How do I update nvarchar with foreign characters using variable?

    This works:

    update MyTable set col1 = N'ČDĎÉĚ'

    this does not:

    declare @a nvarchar(20)

    set @a = 'ČDĎÉĚ'

    update MyTable set col1 = N'@a

    Thank you

  • Hey There,

    The following worked for me:

    declare @a nvarchar(20)

    set @a = N'CDDÉE'

    update testcols set col1 = @a

    HTH

  • It works. Thanks again.

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

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