First set the export file
.export data file= c:\mypath\myoutputfile\output.txt;
You can also write the following for a formatted output.
.export report file= c:\mypath\myoutputfile\output.txt;
Run the query.
SELECT * FROM TABLE_NAME;
Reset the export after export is done.
.export reset;
If there is a need to export as comma delimited; here is the way
.export data file = c:\mypath\myoutputfile\output.txt;
SELECT CAST (Column1||’,'||
Column2||’,'||
Column3||’,'||
………
ColumnN||’,'||As char (250)) (This declaration is to hold all the column names plus commas)FROM tablename
SAMPLE 25;
.export reset;
Popularity: 19% [?]
Our Random Articles
- How To Choose A Good Online Traffic School
- New Year Wishes 2010
- New Year Wishes
- How to use EXTRACT function with date and time columns
- How to Post on a Separate/New Page in WordPress
More Links




No Comment
Popular Articles