Database? Are you sure that both tables have the same number of columns with the same data type/size?
-----Original Message----- From: Nick G [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 15:47 To: SQL Subject: Re: Sub Query Help That got rid of my "Datasource not found" error but now it says "missing VALUES keyword." >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. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2814 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
