Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread database.table.field
Sun, May 13 2007 1:51 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

What happens behind the scenes with a table alias?

I ask because I know

LEFT OUTER JOIN Information.IndexColumns ON Information.IndexColumns.ColumnName = TC.Name AND Information.IndexColumns.TableName = 'MandN'

Doesn't work but

LEFT OUTER JOIN Information.IndexColumns XC ON XC.ColumnName = TC.Name AND XC.TableName = 'MandN'

Does

I also found alias.fieldname can be used in the select statement but database.table.filedname can't. What I'm wondering is what happens if you have the same tablename in two databases and why an alias can be used but not the fully qualified bit.

Puzzled of the Scottish Highlands
Mon, May 14 2007 5:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I also found alias.fieldname can be used in the select statement but
database.table.filedname can't. What I'm wondering is what happens if you
have the same tablename in two databases and why an alias can be used but
not the fully qualified bit. >>

If you have the same table name in two databases in the same query, then
you'll need to assign one or both a correlation name in order to distinguish
it from the other.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image