You are here: Re: nested joins - joining one table to another multiple times « MsSQL Server « IT news, forums, messages
Re: nested joins - joining one table to another multiple times

Posted by ng on 01/09/06 15:55

Hi Steve,

this sql-code will work:

select c.*, u1.id, u2.id, u3.id
from contact c
left outer join users u1 ON u1.username = c.creator
left outer join users u2 ON u2.username = c.modified
left outer join users u3 ON u3.username = c.owner


Steve C schrieb:
....
>
> select c.*, u1.id, u2,id, u3.id
> from contact c
> left outer join users u1
> left outer join users u2
> left outer join users u3
> on (u3.username = c.owner)
> on (u2.username = c.modified)
> on (u1.username = c.creator )
>
> But it compains that
> "The column prefix 'c' does not match with a table name or alias name
> used in the query."

www.zankl-it.de

 

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

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