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 12345»»»

Careful with table name alias Expand / Collapse
Author
Message
Posted Thursday, May 13, 2010 8:58 PM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 6:05 AM
Points: 615, Visits: 1,260
Comments posted to this topic are about the item Careful with table name alias

-- Roshan Joe
*******************************************
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #921732
Posted Thursday, May 13, 2010 10:22 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, June 27, 2014 8:02 AM
Points: 3,241, Visits: 4,996
Very interesting...

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes, winning is not an issue but trying.

You can check my BLOG here

Post #921746
Posted Thursday, May 13, 2010 10:56 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 8:47 PM
Points: 21,340, Visits: 15,016
I think the results on this should be expected. I think the query was written interestingly enough.



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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #921753
Posted Thursday, May 13, 2010 11:42 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 20, 2013 11:49 PM
Points: 336, Visits: 160
It is very interesting. However, am still not clear on [flag ='y' ]. Can someone tell me what is this flag. I didnt get any content in BOL.


thanks



erajendar
Post #921766
Posted Thursday, May 13, 2010 11:59 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:55 PM
Points: 13,357, Visits: 10,222
Good question, although not that hard (for 2 points).


erajendar (5/13/2010)
It is very interesting. However, am still not clear on [flag ='y' ]. Can someone tell me what is this flag. I didnt get any content in BOL.


The flag isn't actually there. Since it is contained in brackets, it is just an alias name for the table.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #921773
Posted Friday, May 14, 2010 12:04 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 12, 2011 5:09 AM
Points: 28, Visits: 50
very interesting, this table alias in select clause got me puzzled for a moment. :)
Post #921775
Posted Friday, May 14, 2010 12:45 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 25, 2014 12:57 AM
Points: 55, Visits: 185
fine, but correct is 'Careful with '
(no rtrim and lower used)
Post #921783
Posted Friday, May 14, 2010 1:11 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 28, 2011 7:06 AM
Points: 151, Visits: 20
Really good question, create confusion in mind for the "=" sign used in alias.
Post #921793
Posted Friday, May 14, 2010 2:48 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 2, 2013 10:52 AM
Points: 32, Visits: 73
I learnt another thing, thanks to the Question of the day.

Post #921839
Posted Friday, May 14, 2010 2:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 24, 2010 11:15 PM
Points: 20, Visits: 8
if flag is alias then can we use next statement like

select [flag='y'].some_data from [where]?
Post #921844
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse