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!

Overwrite Export File using .Export in BTEQ

Status
Not open for further replies.

CBB123

Programmer
Mar 3, 2010
2
US
I've used teradata sql assistant a long time, but recently found a need to use BTEQ. All is going well but I can't figure out how to get the .export command to overwrite the output file. In the teradata documentation it says use the > symbol.. but it doesn't say where or give an example. So this is what I'm running (pared down for the forum)

.SET WIDTH 254
.EXPORT REPORT FILE=<C:\data\myfile.txt

Select * from MyTable;

.EXPORT RESET

Works just dandy, but the output from each run appends the previous output. Thanks in advance for what is probably the easiest question ever asked on here.. I just can't find it.
 
I should make a correction here... the line I wrote
EXPORT REPORT FILE=<C:\data\myfile.txt
Does not read like that.. I think this has driven me so nuts I can't even type straight

EXPORT REPORT FILE=C:\data\myfile.txt (removed the <) is how it in fact reads. Sorry for any confusion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top