SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Table Alias


Table Alias

Author
Message
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17163 Visits: 7415
Interesting back-to-basics question, thanks

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
DBA by default
DBA by default
Old Hand
Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)Old Hand (338 reputation)

Group: General Forum Members
Points: 338 Visits: 727
Thanks for the easy question.

-Tracie
Revenant
Revenant
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12549 Visits: 5010
Really nice one - thanks!
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66899 Visits: 18570
EZ PZ Lemon Squeezy



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26039 Visits: 12499
Hugo Kornelis (5/2/2013)
(And I think every development server SHOULD be set up with case sensitive collation - developing there and deploying to a case insensitive server is okay, the other word around is a disaster

I think I'll add that one to my list of dangerous T-SQL myths. If someone has used a case-sensitive server for development and distinguished betwen the 8 columns COL, COl, CoL, Col, cOL, cOl, coL,and col deployment to a case-insensitive server will be a disaster, far from OK. I am sure that you know better Hugo, and don't understand why you make such a silly statement.

Personally, I think using a case insensitive collation as the default is best practise. Obviously case sensitivity is required for comparing strings in some rare cases, but there's nothing wrong with specifying a case sensitive coolation in those rare cases; the cases where string comparison needs to be case insensitive are, I believe, far more frequent.

Tom

Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26039 Visits: 12499
Hugo Kornelis (5/2/2013)
Rune Bivrin (5/2/2013)
Hugo Kornelis (5/2/2013)

However, to do some nitpicking:

1. If I were to try this code on my system, I would get five errors. All system table (*) names are completely lowercase, so everyone who has a server set up with a case sensitive collation will get error messages. (And I think every development server SHOULD be set up with case sensitive collation - developing there and deploying to a case insensitive server is okay, the other word around is a disaster)

Not necessarily true. If your development server is case sensitive you run the risk of having more than one object with the same name, only with different casing. When deploying on a case INsensitive server it will blow up.

Technically true. Realistically, the chance of this happening by accident is a lot smaller than the chance of using wrong case on a case insensitive server.

If something is case insensitive there is no possible real world referent for "wrong case". So how is the chance of using the "wrong case" different from zero?

Tom

Miles Neale
Miles Neale
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4240 Visits: 1695
+1 :-)

Not all gray hairs are Dinosaurs!
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)SSC Guru (215K reputation)

Group: General Forum Members
Points: 215945 Visits: 41983
L' Eomot Inversé (5/2/2013)
Hugo Kornelis (5/2/2013)
(And I think every development server SHOULD be set up with case sensitive collation - developing there and deploying to a case insensitive server is okay, the other word around is a disaster

I think I'll add that one to my list of dangerous T-SQL myths. If someone has used a case-sensitive server for development and distinguished betwen the 8 columns COL, COl, CoL, Col, cOL, cOl, coL,and col deployment to a case-insensitive server will be a disaster, far from OK. I am sure that you know better Hugo, and don't understand why you make such a silly statement.

Personally, I think using a case insensitive collation as the default is best practise. Obviously case sensitivity is required for comparing strings in some rare cases, but there's nothing wrong with specifying a case sensitive coolation in those rare cases; the cases where string comparison needs to be case insensitive are, I believe, far more frequent.


+1000. Becoming a slave to case sensitivity is a bit insane especially since MS itself has NOT adopted a reasonable naming convention for any objects be it a table name, a column name, or what have you. There are actually very few things that need to be case sensitive. Isolate those things at table design time and make only those columns case senstive. The fact that things like Intellisense perpetuate the poor casing is no good reason for having a case senstive server.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
mtassin
mtassin
SSCertifiable
SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)

Group: General Forum Members
Points: 7286 Visits: 72521
Nice question on the fundamentals... thanks for it.



--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Ken Wymore
Ken Wymore
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6589 Visits: 2397
Thanks for the easy question! Good back to basics one.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search