on 2012 Dec 28 3:10 AM
I am new to Sybase, hopefully someone can help me with this problem.
SELECT * FROM temp_data order by r_date, r_time; OUTPUT TO 'C:\\files\\headerfile.txt' FORMAT TEXT DELIMITED BY '\\x09' QUOTE '' ENCODING 'UTF-8' WITH COLUMN NAMES;
This code works for me but unfortunately WITH COLUMN NAMES;
can not be used in a stored procedure. Then I tried:
unload select location, r_date, r_time, ct_codel_code_title from temp_data TO 'C:\\files\\headerfile.txt' FORMAT TEXT DELIMITED BY '\\x09' QUOTE '' ENCODING 'UTF-8'
still the column name don't appear. Can anyone help?
Request clarification before answering.
The OUTPUT TO statement is interpreted by dbisql -- it is not understood by the server and therefore cannot be used in a stored procedure.
The WITH COLUMN NAMES option is not supported by UNLOAD. An enhancement request has been made for this feature. In the meantime, you might be able to manually writing the column names out with one UNLOAD statement and then writing the data with UNLOAD ... APPEND ON.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.