You are here: Re: SQL 2005 Ambiguous column name « MsSQL Server « IT news, forums, messages
Re: SQL 2005 Ambiguous column name

Posted by steve on 10/03/07 19:50

On Oct 3, 6:58 am, Serge Rielau <srie...@ca.ibm.com> wrote:
>The intent of a CTE is that it is referenced. The same isn't necessarily
>true for columns in the select list (positional bind-out of a cursor)

Hi,

So your explaining another aspect of 'referential' integrity. :-)
I reference it (CTE,Order By etc) the integrity is checked and
enforced.
And if I don't reference it it's my tough luck or my oversight and I
could wind up with a big mess?
Interestingly, it does resemble the logic of a FK reference in a
twisted way. But here chance seems to play a major part :-)
These queries go happly on their merry way:

SELECT a.orderid,a.customerid as Cust,a.shipcountry as
Cust,b.productid
FROM orders as a join [order details] as b
on a.orderid=b.orderid

SELECT a.orderid,a.orderid,a.customerid as Cust,a.shipcountry as
Cust,b.productid
FROM orders as a join [order details] as b
on a.orderid=b.orderid

best,
steve

www.beyondsql.blogspot.com

 

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

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