Robert,

>Both orders and customers have a customerid column

This is the cause of the error. Since both columns have the same field, SQL Server is 
not sure which customerID to pull.

In this case you may want to use an alias to determine the columns. Here's an example

<cfquery name="Getcustomer" datasource="printprices">
SELECT b.*,o.*,c.* FROM bookinfo b, orders o, customers c
Where b.bookid = o.bookid 
</cfquery>

Even better yet, pick the columns that you need from each of the three tables (This 
way you're not pulling customerID twice. Here's an example of what I mean.

<cfquery name="Getcustomer" datasource="printprices">
SELECT b.FieldName1, b.fieldName2,o.FieldName1, o.FieldName2,c.customerID FROM 
bookinfo b, orders o, customers c
Where b.bookid = o.bookid 
</cfquery>

Let me know if you need further help.

Jeremy Brodie
Intelix
an Edgewater Technology Solutions Company

web: http://www.edgewater.com
phone:(703) 815-2500
nasdaq symbol: EDGE



>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to