Jochem van Dieten wrote:
> 
> The only sensible response is to throw an error because the column name is 
> ambiguous.
> 

IT would seem sensible...but no error occurs (at least in SQL Server..)

<cfquery name="test" datasource="myDSN">
SET NOCOUNT ON
CREATE TABLE ##thread (
   threadID INTEGER PRIMARY KEY,
   title VARCHAR(10)
   );
CREATE TABLE ##message (
   messageID INTEGER PRIMARY KEY,
   threadID INTEGER REFERENCES thread,
   title VARCHAR(10)
   );
   INSERT INTO ##thread(threadid,title) VALUES(1,'ttitle')
   INSERT INTO ##message(messageid,threadid,title) VALUES(1,1,'mtitle')
SELECT *
FROM ##thread T INNER JOIN ##message M ON T.threadID = M.threadID;
DROP TABLE ##message
DROP TABLE ##thread
SET NOCOUNT OFF
</cfquery>
<cfdump var="#test#">

Results in:

query - Top 1 of 1 Rows
        MESSAGEID       THREADID        THREADID        TITLE   TITLE
1       1       1       1       ttitle  ttitle

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to