Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Table Alias Expand / Collapse
Author
Message
Posted Wednesday, May 1, 2013 8:33 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, February 6, 2014 4:15 AM
Points: 1,242, Visits: 1,546
Comments posted to this topic are about the item Table Alias



Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com

Post #1448666
Posted Wednesday, May 1, 2013 8:34 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:25 PM
Points: 5,563, Visits: 24,684
Nice question on the basics ... thanks

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #1448667
Posted Wednesday, May 1, 2013 10:31 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 3:43 AM
Points: 1,938, Visits: 1,162
Easy Question

Malleswarareddy
I.T.Analyst
MCITP(70-451)
Post #1448679
Posted Wednesday, May 1, 2013 10:31 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 19, 2014 12:51 PM
Points: 1,118, Visits: 1,578
A very easy on Danny....but nothing better than going back to basics

Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1448680
Posted Wednesday, May 1, 2013 10:31 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 19, 2014 12:51 PM
Points: 1,118, Visits: 1,578
A very easy one Danny....but nothing better than going back to basics

Edit: Sorry for the double post....the browser hung up on me.


Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1448681
Posted Wednesday, May 1, 2013 11:47 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 11:20 AM
Points: 1,888, Visits: 2,323
Good basic question Vinay :)


_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1448695
Posted Thursday, May 2, 2013 12:13 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:37 PM
Points: 832, Visits: 1,893
YES; finally my powers are restored in my finnnngers (i mean i selected the right answer )

thank you for the post, nothing can beat the classics;


ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
Post #1448701
Posted Thursday, May 2, 2013 1:17 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:24 AM
Points: 2,451, Visits: 2,342
I like explanation!
Post #1448708
Posted Thursday, May 2, 2013 1:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:16 PM
Points: 5,915, Visits: 8,162
Good question, though I'm surprised that, apparently, people are doing this wrong. Since you'll be rewarded by an error message when you try, I don't understand how people could not do this correct - at least after being hit once.


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)

2. I don't see the advantage of using a system table (*) in this question. Why not add a CREATE TABLE to make a simple demo table and use that? Okay, it would have been a bit more code in the question, but it would save all the readers of having to look up if the various columns used in the question actaully exist in sysobjects.

3. And if you must use a system table (*), at least avoid using the deprecated ones. You could have used sys.objects instead. Please don't encourage people to use compatibility views; they might just be gone in the next release!

(*) Yeah, I know, I know. Not system tables, but system views. Or rather: compatibility view (for sysobjects) and object catalog view (for sys.objects)



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1448711
Posted Thursday, May 2, 2013 1:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:16 PM
Points: 5,915, Visits: 8,162
EDIT: Double post removed.
(I got an error message when posting, so I assumed the post didn't go through. Should have checked before reposting)



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1448712
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse