Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003

    Unanswered: In SQL Server 'XYZ' & 'xyz' are treated as same value

    Dear All,

    In ORACLE, the values 'XYZ' and 'xyz' are treated as different values and I can enter two records with the primary key field having values 'XYZ' and 'xyz'.

    But In SQL Server, 'XYZ' and 'xyz' or 'xYz' or 'Xyz' etc are treated as same value. So, when I try to insert 'xyz' after inserting a record with 'XYZ' as value of the primary key field, it gives me the duplicate record error. How to solve this problem?
    I want it to work the SQL Server same as Oracle according to our requirement.

    Can any one of you Please help me out in this regard?


  2. #2
    Join Date
    Jun 2003
    cape town, south africa
    oracle is case sensitive, by default sql is not...
    you can either change your whole installation to be case sensitive
    or just make that primary key column case sensitive by running the command below...

    alter table tablename
    alter column columnname datatype
    collate SQL_Latin1_General_Cp1_CS_AS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts