Skip to Main Content
  • Questions
  • spool output columns in seperate csv column - call from SQL developer

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Volkenand.

Asked: January 18, 2017 - 8:18 am UTC

Last updated: January 18, 2017 - 3:02 pm UTC

Version: 4.0.1.14

Viewed 1000+ times

You Asked


additional question to the question from yesterday :
: http://asktom.oracle.com/pls/apex/f?p=100:12:0::NO::P12_ORIG,P12_PREV_PAGE,P12_QUESTION_ID:Y,1,9532893700346545049

I'm using the SQL developer for starting scripts.

additional question: where do I add the || ';' ||, when I have defined additional Header names for the Output?
I have tried after the column Name and before the ;, but there are always SQL errors

select DSTDATV AS "Gültigkeitsdatum -von", DSTDATB AS "Gültigkeitsdatum -bis" ...  further columns

and Chris said...

I'm not sure what you're trying to do. But if you're using SQL Developer, you don't need to add || ';' ||. Just use the csv comment:

with rws as (
  select rownum x, 'stuff' y from dual connect by level <= 5
)
  select /*csv*/x as "heading 1", y as "heading 2" from rws;

"heading 1","heading 2"
1,"stuff"
2,"stuff"
3,"stuff"
4,"stuff"
5,"stuff"

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

on CSV

Rajeshwaran, Jeyabal, January 18, 2017 - 12:04 pm UTC

Chris Saxon
January 18, 2017 - 3:02 pm UTC

Thanks for the sharing