Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*PLUS Format Question
Another way of doing this could be as follows:
set head off feed off space 0 pages 0 lines {whatever}
select col1||col2||col3||
from table;
This would select 1 BIGGGG column back in a CHAR format. You could of course include field seperators of commas, colons, spaces, etc. to use as delimiters and/or you could format each field to be a particular format using lpad/rpad. The world is your oyster.
Martin
Andy Hering wrote:
> Hi,
>
> I'm using a sqlplus script that will dump the contents of a table into
> an ASCII Flatfile. Everything works fine, except that the first column
> does NOT start at position one, but rather position 2. I tried several
> ways to resolve this, but nothing seemed to work. When I tried ltrim,
> it forced the column in position 1, but put a lot of spaces between
> column 1 and column2. My first column is a number column. Is there any
> way to get the SQL*Plus to start the output at position 1?
>
> Thanks,
> Andy
Received on Wed Jun 03 1998 - 00:00:00 CDT
![]() |
![]() |