From: Geoff Chambers on 10 Jan 2007 10:17 I have an application in production that is only using one module in the application. I have greatly modified the SQL database and would like to replace it with the one in use now. The problem I have is I need to extract all of the data from one table and add the data to the new table. I read were you can output a sleect command to a text file, but don't see anything on inseting in a table from this Text file. Is there a simple way of doing this?
From: Willie Moore on 10 Jan 2007 10:47 Geoff, Geoff Schaller has done a good bit of this. He has a routine to load a table from a csv file. You can also do a table to table transer using the insert xxxxxx select * from yyyyyy. the selected part can be from another database. Regards, Willie "Geoff Chambers" <gchambers02(a)msn.com> wrote in message news:1168442248.219759.179400(a)77g2000hsv.googlegroups.com... >I have an application in production that is only using one module in > the application. I have greatly modified the SQL database and would > like to replace it with the one in use now. The problem I have is I > need to extract all of the data from one table and add the data to the > new table. I read were you can output a sleect command to a text file, > but don't see anything on inseting in a table from this Text file. > > Is there a simple way of doing this? >
From: Stephen Quinn on 10 Jan 2007 17:45 Geoff >> I have an application in production that is only using one module in the application. I have greatly modified the SQL database and would like to replace it with the one in use now. The problem I have is I need to extract all of the data from one table and add the data to the new table. I read were you can output a sleect command to a text file, but don't see anything on inseting in a table from this Text file. Is there a simple way of doing this? << INSERT INTO target SELECT * FROM source; HTH Steve
From: Geoff Chambers on 11 Jan 2007 10:32 I don't see how this works, I can have only one connection at a time. There are 2 databases the one in production and the one I modified. I want to pull all of the data from one table in the production file and add the data to the modified file. Stephen Quinn wrote: > Geoff > > >> > I have an application in production that is only using one module in the > application. I have greatly modified the SQL database and would like to replace > it with the one in use now. The problem I have is I need to extract all of the > data from one table and add the data to the new table. I read were you can > output a sleect command to a text file, but don't see anything on inseting in a > table from this Text file. > > Is there a simple way of doing this? > << > > INSERT INTO target SELECT * FROM source; > > HTH > Steve
From: Willie Moore on 11 Jan 2007 11:30 Geoff, You can use multible databases from one ADO connection. You just have to reference which database you are looking for. INSERT INTO db1.target SELECT * FROM db2.source; Of couse the user would have to have credentials to both databases <g>. To do it, the easiest way would be to create an ADOConnection and then use the execute method to run the SQL statement. Regards, Willie ps. Here is a sample from the booksonline --INSERT...SELECT example INSERT dbo.EmployeeSales SELECT 'SELECT', e.EmployeeID, c.LastName, sp.SalesYTD FROM HumanResources.Employee AS e INNER JOIN Sales.SalesPerson AS sp ON e.EmployeeID = sp.SalesPersonID INNER JOIN Person.Contact AS c ON e.ContactID = c.ContactID WHERE e.EmployeeID LIKE '2%' ORDER BY e.EmployeeID, c.LastName;
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Crystal Report "Basic syntax not supported" Next: Wildseek doesn't work with memo-fields |