I need to write an sql statement within a cfquery tag that pulls from two 
seperate datasources.

But it's coming back with "Invalid object name "

Below is the what I have written:

<cfquery datasource="#request.dsn#" name="towns">
SELECT townid as tid, town as cityname from towns
where siteID = 1
union
select distinct city as cityname
from compdb.dbo.commlease
order by cityname
</cfquery>

Can anyone tell me what I'm doing wrong?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272933
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