Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing a SQL Insert statement
Message
From
22/03/2006 12:32:22
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
22/03/2006 11:18:10
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01106642
Message ID:
01106711
Views:
25
>Simplified
>use table.dbf
>
>go top
>scan
>INSERT INTO sqltablepersons where person1 from dbf

IF by that you mean

INSERT INTO sqlTablePersons (field1, field2) ;
SELECT field1, field2 from person2 ;
where personid = person2

You will need an index on the VFP DBF for your person id field.

>INSERT INTO sqltablepersons where person2 from dbf
>INSERT INTO sqltablepersons where person3 from dbf
>insert into sqltablevehicle
>insert into sqltableletter
>
>endscan
>
>I am also doing some seeks into other dbf's during the scan and a couple sql select statements to see if records already exist in the sql tables before inserting, eveything runs efficiently except the sql inserts
Previous
Reply
Map
View

Click here to load this message in the networking platform