Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an SQL statement that outputs data to a text file.

Status
Not open for further replies.

Slugmaster

Programmer
Jan 15, 2001
18
0
0
US
I am trying to write an SQL query that selects specific records from an ODBC database and outputs them to a text file in a specified format.

A co-worker of mine recently attended a workshop which gave us the idea. Unfortunately, he is not an SQL person and has no idea of how it is soppose to work. His notes read: "SELECT * FROM Table1 Where Table1.[Field1] = 1 OUTPUT TO C:\data.txt FORMAT DIF"

I can not find anything on the SQL OUTPUT statement. Is there such a thing and how does it work?

Is there an easier way to accomplish this task?
 
What DBMS are you using? I know for a fact you can do this with Microsoft SQL Server and its 'bcp' utility.

bitwise
 
I am not sure what is being asked, but here is some more information.

I am using Sysbase SQL. In VB, I am using DAO 3.6 object library and connecting with ODBC.
 
Also, his notes have a reference to Sysbase SQL Anwhere 5.0, ISQL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top