Friday, February 24, 2012

inserting symbols in field

Hi All,
I am trying to insert symbols in a field of a table.

I am using the datatype nvarchar for the field.
However when i tried to insert a statement with the symbol pi, it comes out as following:
(A) 100? cm2 (B) 140? cm2 (C) 200? cm2

All the pi symbol are converted to ?.

Can ne 1 tell me how i can store such strings in the field.

Thanks

You're not stating how you're inserting the strings. If you're inserting using a plain INSERT statement you must N-prefix the string literals when using nvarchar.

INSERT INTO thetable (thecolumn,anothercolumn) VALUES(N'whatever',N'however')



No comments:

Post a Comment