Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a Cobol flatfile in sqlplus
Hi.
Try
SELECT RPAD(T,5) || II || I FROM mstest;
HTH. Michael
In article <3954CAF3.DA5D65C1_at_excite.com>,
Manfred Friedrich <mfriedrich_at_excite.com> wrote:
> I would like to create a flatfile out of sqlplus
> from the following table:
>
> SQL> desc mstest
> Name Null? Type
> ------------------------------- -------- ----
> T VARCHAR2(5)
> II NUMBER(7,2)
> I NUMBER(3)
>
> SQL> select * from mstest;
>
> T II I
> ----- ---------- ----------
> M 7000,77 49
> K 17000,17 59
>
> The Output which I would like to see is
>
> M 0700077049
> K 1700017059
>
> I tried:
>
> SET NEWPAGE 0
> SET SPACE 0
> SET PAGESIZE 0
> SET ECHO OFF
> SET FEEDBACK OFF
> SET HEADING OFF
> column i format 000
> column ii format 00000v00
>
> and the result is
>
> M 0700077 049
> K 1700017 059
>
> There is one extra space before each mumeric value.
>
> How can I avoid this?
>
> TIA.
>
> Manfred
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Jun 24 2000 - 00:00:00 CDT
![]() |
![]() |