Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Which “special” characters are allowed in SQL Server varchar fields? Expand / Collapse
Author
Message
Posted Tuesday, October 15, 2013 4:24 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 12:02 AM
Points: 50, Visits: 224
Hi Guys,

I'm trying to update CompanyName Column in a table my query is very simple:

Update dbo.CompassAD

SET CompanyName = 'BWTS SPECIALIZED-PPC KRAAIFONTEIN'

WHERE CompanyName = 'BWTS SPECIALIZED û PPC KRAAIFONTEIN'

The problem is it returns no data when I execute the query and column datatype is Varchar(350).

Thanks
Post #1504670
Posted Tuesday, October 15, 2013 4:39 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 11:42 AM
Points: 13,295, Visits: 11,086
Maybe you should use unicode? (the nvarchar data type)



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1504672
Posted Tuesday, October 15, 2013 4:58 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Wednesday, October 22, 2014 4:00 AM
Points: 4,427, Visits: 4,175
To answer your question in the subject header, it depends on your collation. Each collation contains some special varchar characters, but they vary.
What is the collation of your column?


Markus Bohse
Post #1504676
Posted Tuesday, October 15, 2013 5:34 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 12:02 AM
Points: 50, Visits: 224
Latin1_General_CI_AS
Post #1504691
Posted Tuesday, October 15, 2013 6:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 12:02 AM
Points: 50, Visits: 224
Hi Koen Verbeeck
It worked changed my datatype to nvachar..thanks a lot.
Post #1504715
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse