Try this:

INSERT INTO [databasename].[dbo].[tablename]

Chris

-----Original Message-----
From: Nick G [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 23, 2007 4:07 PM
To: SQL
Subject: Sub Query Help

I have no experience using sub queries and have found little help else
where. I am looking to select records from one table and insert them
into another. The tables are identical but they are in different schemas
and different servers. I understand why I get the Datasource not found
error but how do I get around it? I don't know where to go from here:

<cfset Newdatasource="Access"> 

<!--- DATA CONNECTIONN --->
<cfset Newtable1="WEBTEST">
<cfset Newdatasource1="ScheduleTest">

<cfquery name="Insert" datasource="Newdatasource1"> INSERT INTO
#Newtable1#.SiteLog SELECT * FROM #Newdatasource#.VisitLog </cfquery>

Is this sort of query possible? How do you get the two datasources
recognised? Any help would be greatly appreciated. Thanks.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2812
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to