Re: SQL Question
Date: Thu, 24 Feb 2000 07:34:09 -0700
Message-ID: <onbt4.30$e12.16548_at_wdc-read-01.qwest.net>
Since COL allows you to indent your title, I assume you are asking to insert a leading space on each output line.
You could select a null into the output, and format the alias column as a1:
column sp heading '' format a1
select '' sp, dummy from dual;
However, this will give you the null column AND a column separator - 2 leading spaces. Now it gets ugly:
set colsep ''
select id, null sp, mode_line, null sp, rf_min, null sp, rf_max, null sp ...
Your output will now have 1 leading space and continue to have 1 space between fields.
Perhaps someone else has a more elegant solution. Then again, maybe I misunderstood your need.
- Mike
Ranjit Bajaj <ranjit.bajaj_at_NOSPAMrdel.co.uk> wrote in message
news:38b51100.1203794655_at_news.rrds.co.uk...
> I'm using Oracle8i, and i'm outputting column data to a file.
>
> I'm having problems finding a command that will left align the data by
> one
> space on each new line of the output file.
>
> Can anyone please help....i've looked at the COL clause but this can
> only be
> applied to titles. Is there a way of aligning the output data by one
> space ?
>
> Here is a snippet of my code:
>
> COLUMN id HEADING 'X' FORMAT 99999;
> COLUMN mode_line HEADING 'X' FORMAT 9999;
>
> COLUMN rf_min FORMAT 9.99999999EEEE;
> COLUMN rf_max FORMAT 9.99999999EEEE;
> COLUMN prf_min FORMAT 9.99999999EEEE;
>
>
> Thankyou
>
>
Received on Thu Feb 24 2000 - 15:34:09 CET
