Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: beginner - unload tables with fix length?
sql>col id format 99999999 sql>col name format a30 sql>set linesize 200 <-- size of the line, so that one record fits in oneline
ID NAME
-------- ------------------------------- 1 miller 2 smith
It goes like this:
col COL_NAME format [if the col_type is number then here goes digits, if the
col_type is string then here goes aX, where X=width]
hth
wysza
"Christof Müller" <christof.mueller_at_andaro.com> wrote in message
news:3A834E69.47DA4CAE_at_andaro.com...
> Here my example:
> create emp (id number(12), name varchar2(30))
>
> I would like to extract the table and the only way I currently know is:
> spool xxx
> Select id||';'||name||';' from emp;
> spool off
>
> The result is:
> miller;1
> smith;2
>
> But I wouldn't like to have ';' separated fields but fix length (length
> of
> column definitions:
> miller 1
> smith 2
> Can anybody tell me how to deal with the problem?????
>
Received on Thu Feb 08 2001 - 20:21:25 CST
![]() |
![]() |