You are here: Re: Ambiguous Column Names in Multi-Table Join « MsSQL Server « IT news, forums, messages
Re: Ambiguous Column Names in Multi-Table Join

Posted by Mike S on 06/21/06 16:46

Jack Vamvas wrote:
> You could :
> SELECT E1.id as "Employees_ID", E2.id as "Employers_ID"
> FROM Employees as E1 LEFT JOIN Employers AS E2 ON (E1.Id=E2.Id)

I was actually thinking about doing it that way, just aliasing all the
columns. I was hoping to avoid that because it would involve changing a
number of existing queries/program code - plus most of the queries are
'SELECT * FROM Table" type queries, so to produce the same results, I'd
have to alias every single column in each table. For this particular
project, I think it might be easier to deal with names like Id, Id1,
Id2, etc., even though it's not very readable...oh well, just a matter
of adding extra comments to the source code ;-)

--
Mike S

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация