I think you need to use the STRCONV() function.
Luis Navas
>Hello All,
>We have an application in which several fields are being converted to Unicode in SQL Server 2000. Does anyone know of a way to use a Unicode value in parameterized view? It is fairly easy in passthrough using the "N" prefix, as in
>
>SELECT * FROM EMPLOYEE WHERE LASTNAME = N'your unicode value here'
>
>But I can't find a way to pass a unicode parameter to a view, as in:
>
>open database myDBC
>create sql view "rvMyView" remote connection "XYZ" AS ;
> select * from employee ;
> where lastname = ?lcMyVar
>
>lcMyVar = 'some unicode value here'
>USE (myDbc!rvMyView) IN 0 ALIAS myview
>
>The code above doesn't work. Traced with the debugger, lcMyVar will correcly show the unicode, but the query returns no data. A trace on the back-end SQL database showed that the query is arriving with what looks like ASCII code? (not really sure what it is, just numbers and symbols, probably the result of trying to interpret the unicode value as ASCII.) If I run the same query using SQL-passthru it does work.
>
>Any suggestions greatly appreciated!
>
>Vince
I never forget a face, but in your case I will make an exception :-)