Solved

MSSQL vor and wor is considered equals?

Posted on 2011-03-10
8
431 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
  • 4
  • 3
8 Comments
 
LVL 142

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 142

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 142

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Read about achieving the basic levels of HRIS security in the workplace.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

809 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