Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy all tables in SQL server to DBFs
Message
 
 
To
08/11/2010 20:53:37
Victor Chignes
Inteliventas
Peru
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01488559
Message ID:
01488560
Views:
135
This message has been marked as the solution to the initial question of the thread.
>Hello:
>
>Does anyone have code to iterate to all tables in a SQL Server database and issue a 'copy to (tablename).dbf?'
>
>
>TIA

You can not do copy to. You can do select * from ...

This should be simple.

1. Get a list of all tables using
select Table_Schema, Table_Name from INFORMATION_SCHEMA.Tables order by Table_Schema, Table_Name
2. Scan the cursor and create
select * from [<<Table_Schema>>].[<<Table_Name>>]
commands and run each command separately.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform