When you are actually dealing with unicode data.
Unfortunately, Tek-tips does not support unicode posts, so it's a little difficult to show.
[tt][blue]
Declare @Temp VarChar(20)
Set @Temp = N'[Ω]'
Select @Temp, N'[Ω]'
[/blue][/tt]
When you run this code, you will see the Capital Letter O returned for the @Temp variable. This happens because it is defined as varchar(20). If you change this to....
[tt][blue]
Declare @Temp [!]n[/!]VarChar(20)
Set @Temp = '[Ω]'
Select @Temp, N'[Ω]'
[/blue][/tt]
You will get the same result eventhough @Temp is now defined as nvarchar(20).
If you truly want to set @Temp to be the 'omega' symbol, you must do it this way...
[tt][blue]
Declare @Temp [!]n[/!]VarChar(20)
Set @Temp = [!]N[/!]'[Ω]'
Select @Temp, N'[Ω]'
[/blue][/tt]
When you run that last code block, you will see [Ω] displayed for the @Temp variable.
Of course, I used the greek letter Omega as an example, but you would have similar problems for other Non-Ascii data, like Japanese and Chinese characters.
Make sense?
-George
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom