Re: SQL7: case sensitivity
From: Lars Broberg (lars.b_at_elbe-data.nothing.se)
Date: 04/19/04
- Next message: Jacco Schalkwijk: "Re: 1st normal form qn"
- Previous message: Frank Spencer: "1st normal form qn"
- In reply to: Steve Kass: "Re: SQL7: case sensitivity"
- Next in thread: Jochen Daum: "Re: SQL7: case sensitivity"
- Reply: Jochen Daum: "Re: SQL7: case sensitivity"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 10:24:25 +0200
PMFJI,
In SQL Server 7 you specify the collation on the SERVER level (this is
changed in SQL Server 2000 where you can specify it down to column level).
-- Lars Broberg Elbe-Data AB http://www.elbe-data.se Remove "nothing." when replying to private e-mail! "Steve Kass" <skass@drew.edu> wrote in message news:%23RbPl9cJEHA.208@tk2msftngp13.phx.gbl... > Jochen, > > While upper and lower case characters are stored differently in SQL > Server tables, and their binary representations can be distinguished. But > distinguished doesn't mean distinct from the point of view of a UNIQUE > constraint. It is the database collation that determines whether x = y > evaluates to true or to false for two strings x and y, and the comparison > x = y is what's used to determine if non-null strings are to be considered > as distinct or not. If a case-insensitive collation is in place (this is > the default instance collation, which extends to databases for which no > collation was specified upon creation), then x = y evaluates to true if x > and y differ only in case, and you will see a violation of the unique > constraint if you try to put such values in a unique-indexed column. > > I believe that in SQL Server 7 you can specify the collation on a > per-database level, so you may wish to store this data in a database with > a case-sensitive collation. > > However, I don't know what rules Unix uses to determine if two strings > are identical or not. If Unix makes a binary comparison of the strings, > you could consider storing the filenames in a varbinary(...) column > instead of varchar(...). > > Steve Kass > Drew University > > Jochen Daum wrote: > >>Hi, >> >>I have a table, which is supposed to store filenames stored on a Unix >>filesystem. I seem to be having problems with case sensitivity there: >> >>I can store two files, with the same name and different spellings, eg. >>test1.txt and Test1.txt >> >>But I cannot set a unique index on the columns that stores the >>filename, it reports duplicates for this file. >> >>Can someone point me to options? >> >>Thanks in advance, >> >>Jochen >> >> >> >
- Next message: Jacco Schalkwijk: "Re: 1st normal form qn"
- Previous message: Frank Spencer: "1st normal form qn"
- In reply to: Steve Kass: "Re: SQL7: case sensitivity"
- Next in thread: Jochen Daum: "Re: SQL7: case sensitivity"
- Reply: Jochen Daum: "Re: SQL7: case sensitivity"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|