Solved

MSSQL vor and wor is considered equals?

Posted on 2011-03-10
8
441 Views
Last Modified: 2012-05-11
Hi,

I have an update statement where i try to insert the text "vor" into a column called username. There is already a username = 'wor", and the system gives me a:

Violation of UNIQUE KEY constraint 'tc_usertbl_username'. Cannot insert duplicate key in object 'dbo.usertbl'.

as we all can see, wor is not like vor, but my sql server seems to think differently..

i have tried to change username to nvarchar, and it seems to work, but this is an old system, and i have no idea if anybody has done a "select * from usertbl" and referenced the position instead of column names. if so, the workaround i have done will make it fail.

i do not want to create a new table, move data, drop foreign keys, drop old, rename new, create new foreign keys, because i have no idea how many fk's there are..

does anybody have any easier way of getting around this problem?
0
Comment
Question by:dds_felles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35094164
what is the collation of the field?
0
 
LVL 1

Author Comment

by:dds_felles
ID: 35094274
i dont know.. .

where do i find the collation for that specific field?

0
 
LVL 1

Author Comment

by:dds_felles
ID: 35094277
found it : SQL_Scandinavian_CP850_CI_AS
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 35094359
>SQL_Scandinavian_CP850_CI_AS
that is indeed "problem", it considers the v and the w to be identical indeed.
you need to change the collation of that column (to sql latin for example) to solve that problem (but it might raise other issues ...)
0
 
LVL 1

Author Comment

by:dds_felles
ID: 35094527
thanks, ill try it out. do you know how to change the collation on a single clomn?

0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 35094664
>>do you know how to change the collation on a single clomn?<<
As angelIII has pointed out v and w are the same, at least if you are Swedish.  Look up the COLLATE keyword.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35094680
0
 
LVL 1

Author Closing Comment

by:dds_felles
ID: 35094814
Thank you for the quick and correct reply :)
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question