Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL BCP Files Into FoxPro
Message
From
05/08/2009 10:30:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL BCP Files Into FoxPro
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01416196
Message ID:
01416196
Views:
199
Hi,

I've been provided from a client many files that were exported from their SQL Server database using the BCP utility, with matching format files for each table. The files have a .TXT extension but are not readable ASCII text. I need to somehow get this data into VFP tables.

1. How can I tell what the format of these files is?
2. How do I manipulate/convert it to be able to import into VFP?

I need to do my work from VFP, as we don't have SQL Server here to do anything with the files.

Here is the command the client used to pull one of the files:

C:\WINDOWS\system32>bcp "SELECT * FROM [RE7].dbo.Appeal Where ( (0 = 0) Or (DateChanged >= Convert(varchar, DateAdd(d, -0, GetDate()), 101)))" queryout "D:\MSSQL\BACKUP\Masterworks Scripts\Output\Appeal.txt" -SRE-sQL -T -n

And here is the command they used to create a format file:
C:\WINDOWS\system32>bcp [RE7].dbo.Appeal format nul -S -T -n -f "D:\MSSQL\BACKUP\Masterworks Scripts\Output\Format_Appeal.txt"

Thanks,
Ron
Next
Reply
Map
View

Click here to load this message in the networking platform