![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
on one hand, I would concur: in most cases we need case insensitive data in the database. For instance, we in our shop uppercase all the data when we load it into Oracle. On the other hand, I think that case sensitive indexes may be implemented more efficiently than case insensitive ones, just because binary (case sensitive) comparisons are the fastest ones possible. However I am not sure what the performance gain might be... |
#22
| |||
| |||
|
|
Daniel, you failed to notice a loud and clear ORDER BY clause in my script SELECT * FROM T1 order by c1; and decided I'm a newbie and need a lecture on the basics? ![]() |
#23
| |||
| |||
|
|
With an ORDER BY the result > set is identical. |
#24
| |||
| |||
|
|
Note that binary <> case-sensitive in SQL Server. |
#25
| |||
| |||
|
|
Note that binary <> case-sensitive in SQL Server. yes, but you need < and > comparisons to navigate an index. I guess Finnish_Swedish_CS_AS collation is implemened as a function. As such, it probably works a little bit slower than raw bytes comparison, probably no big deal, just a little bit slower. Makes sence? |
#26
| |||
| |||
|
|
With an ORDER BY the result > set is identical. Can you post versions of SQL Server and Oracle and operating systems for which they are identical? In fact it is a well known little obstacle in migrations between Oracle and SQL Server. More to the point, immediately before posting I ran the script and cut and pasted my results. Repeat, the results as harvested from 2 live servers several hours ago are different: SELECT * FROM T1 order by c1; SQL Server: c1 ---------- A_A AAA (2 row(s) affected) drop table t1; The same script in Oracle running on UNIX (HP-UX) returns rows in a different order: C1 ---------- AAA A_A |
#27
| |||
| |||
|
|
Thank you all for your commencts on this - I didn't know it is so common and relatively painful issue. Certainly, I wasn't expecting it, that ther eis no easy solution to this. My opinion is that table and column name should be insensitive by pretty much 80/20 or yet better 99/1 rule (it's a new one:-), the 1 only when we are looking for readability of the object or column name. To the contrary, we always need to read the data (actual information) from these tables and columns, so data got to be sensitive. I don't think people enjoy seeing there names in funny cases like mIKe vs Mike, let alone that e.e...example which I'm not aware of. More importatntly, if it is such a pain then why not provide this as an option in collation; if SQL server can give you so many other options, this one can also be included - specially when SQL server is not the leader in DB category. I think adopting a standard is good - so I'll be forced to use SQL_Latin1_General_CP1_CS_AS to keep all sensitive across the board to avoid confusions. chao, Nasir "Alexander Kuznetsov" <AK_TIREDOFSPAM (AT) hotmail (DOT) COM> wrote in message news:1147491491.272900.168260 (AT) y43g2000cwc (DOT) googlegroups.com... With an ORDER BY the result > set is identical. Can you post versions of SQL Server and Oracle and operating systems for which they are identical? In fact it is a well known little obstacle in migrations between Oracle and SQL Server. More to the point, immediately before posting I ran the script and cut and pasted my results. Repeat, the results as harvested from 2 live servers several hours ago are different: SELECT * FROM T1 order by c1; SQL Server: c1 ---------- A_A AAA (2 row(s) affected) drop table t1; The same script in Oracle running on UNIX (HP-UX) returns rows in a different order: C1 ---------- AAA A_A |
#28
| |||
| |||
|
|
I don't see a problem setting the database collation to case insensitive and specifying at a column level the case sensitive option - you need only do it once at CREATE TABLE time and its no more hassle then writing NOT NULL or NULL, its COLLATE <collation name>. |
![]() |
| Thread Tools | |
| Display Modes | |
| |