Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Inserting VFP table into SQL

Author  Topic 

RichardSteele
Posting Yak Master

160 Posts

Posted - 2003-03-25 : 20:20:37
I have a VFP table that needs to be inserted into a SQL table with the same structure and name.

Is there a way to insert all of the records from this VFP table into a SQL 2000 table using a simple SQL Insert? If so, what would this look like?

Thanks in advance.


Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-03-25 : 20:39:50
Did we do this last week ?
I would setup your VFP database as a linked server (look in BOL)
Then you can do

INSERT Into DestTable (field1, field2)
SELECT field1, field2
FROM linkedVFP..SourceTable



Damian
Go to Top of Page

RichardSteele
Posting Yak Master

160 Posts

Posted - 2003-03-25 : 20:52:09
Hi Damian,

Thanks for your reply. That was helpful.

Before I was asking other questions regarding using subqueries, in particular doing an insert on a select, as opposed to how to get VFP to link to SQL.



Go to Top of Page
   

- Advertisement -