Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Special Characters

Author  Topic 

MBeal
Posting Yak Master

110 Posts

Posted - 2010-05-11 : 16:15:58
I am having a difficult time finding anything online about how SQL handles special characters such as these:

Á á É é Í í Ñ ñ Ó ó Ú ú Ü ü

I have a record in the database that uses these characters and the record was written properly and I can see it when I query on a different field however when I query this field for an exact match SQL cannot identify it I guess because no results are returned.

Any idea if there is a setting in SQL that turns on these types of special characters? Or are they simply not allowed?

MBeal

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2010-05-11 : 16:39:24
SQL Server supports both single byte and unicode chars. single byte via char/varchar, unicode via nchar/nvarchar

what is the data type of the column with these chars?


elsasoft.org
Go to Top of Page

MBeal
Posting Yak Master

110 Posts

Posted - 2010-05-11 : 17:40:25
The field is a varchar(512)

MBeal
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-12 : 01:32:25
change the column to nvarchar(512).


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

MBeal
Posting Yak Master

110 Posts

Posted - 2010-05-12 : 17:02:05
Since I am sending data from a device using a web service to import into SQL, will I need to change anything else? I am pretty certain the .NET side of things just considers this data a String so it should not matter.

Are there any issues with lost data when I convert the data types? I wouldn't expect there to be but just thought I would ask.

Thank you

MBeal
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2010-05-13 : 03:03:44
>>the .NET side of things just considers this data a String

in .net all strings are unicode. so there will be no conversion if you use nvarchar.


elsasoft.org
Go to Top of Page
   

- Advertisement -