Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Export data in ASCII format.
This may help ..
SET ECHO off
REM --------------------------------------------------------------------------
REM --------------------------------------------------------------------------
REM ---------------------------------------------------------------------------
set tab off
set heading off heading off feedback off echo off verify off space 1
pagesize
0 linesize 120
accept owner prompt 'What schema owns the table to be unloaded?
'
accept table_name prompt 'What table is to be unloaded? '
accept default_precision prompt 'What TOTAL number of digits should be
reserved for numbers without defined precision? '
accept default_scale prompt 'What number of DECIMAL digits should be
reserved for numbers without defined scale? '
--Calculate the sum of all output field lengths and set the output record
size
select 'SET LINESIZE '
|| (sum(decode(data_type, 'CHAR',data_length, 'VARCHAR',data_length, 'VARCHAR2',data_length, 'DATE',14, 'NUMBER',decode(data_precision, '',&default_precision+2,
greatest(data_precision-data_scale,1)+decode(data_scale,0,0,1)+data_scale)+1 ,
'FLOAT',&default_precision+2, data_length)))
rpad('0',greatest(data_precision-data_scale,1),'9') || decode(data_scale,0,'','.')
||
'FLOAT',rpad('0',&default_precision-&default_scale,'9')||'.'||rpad('9',&defa
ult
_scale,'9'),
'ERROR'),40) || ' HEADING ''X'''
spool off
- -- Generate the SQL*Loader control file ---------------------------------------------------------------------------- -
|| decode(data_type, 'CHAR','CHAR('||data_length||')', 'VARCHAR','CHAR('||data_length||')', 'VARCHAR2','CHAR('||data_length||')', 'DATE','DATE(14) "YYYYMMDDHH24MISS"','NUMBER','DECIMAL
'',&default_precision+2,
greatest(data_precision-data_scale,1)+decode(data_scale,0,0,1)+data_scale+1)
||')', 'FLOAT','DECIMALEXTERNAL('||to_char(&default_precision+2)||')', 'ERROR--'||data_type)
|| ' NULLIF ("' ||column_name||'" = BLANKS)'from dba_tab_columns
spool off
- -- Cleanup ---------------------------------------------------------------------------- -
kelvinw_at_asymetrix.com wrote in message <3630a9f3.252478194_at_news>...
> >Hi everybody, > >I have a bunch of tables needed to be exported in ASCII format with >comma delimited and loaded up to a spreadsheet. I have tried the >exp73.exe utility. It seems to me that it can only export table data >in a Oracle format. Does anyone have an idea how to export table >data in ASCII format. > >Thanks, > >__kelvin
begin 666 Yassir Khogaly.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DMH;V=A;'D[66%S<VER#0I&
M3CI987-S:7(@2VAO9V%L>0T*5$E43$4Z4V5N:6]R($]R86-L92!$0D$-"E1%
M3#M(3TU%.U9/24-%.BLT-"@P*3$X,2 T-C T,#0R#0I414P[0T5,3#M63TE#
M13HK-#0T,3$Y,#8W-S8-"D%$4CM(3TU%.CL[.SM+96YT.SM%;F=L86YD#0I,
M04)%3#M(3TU%.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z2V5N=#TP1#TP
M045N9VQA;F0-"E523#IH='1P.B\O=W=W+FMH;V=A;'DN9G)E97-E<G9E+F-O
M+G5K#0I54DPZ:'1T<#HO+W=W=RYA965U+F]R9RYU:PT*14U!24P[4%)%1CM)
M3E1%4DY%5#IY87-S:7) :VAO9V%L>2YF<F5E<V5R=F4N8V\N=6L-"E)%5CHQ
<.3DX,3 S,50R,#(X-#1:#0I%3D0Z5D-!4D0-"@``
`
end
Received on Sat Oct 31 1998 - 14:28:45 CST