Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Exporting ASCII Text file
Looking at the SQL responses it looks like everyone neglected the cases
where the column itself may contain commas. It is safest to enclose each
data item with double-quotes e.g.
SELECT '"'||col1||'","'||col2||'"' from table;
this would give results like
"col1_item", "col2 item with, coma"
which would be intepreted as two columns of data by Excel otherwise the
comma within the second column would confuse Excel into thing there are 3
cols instead of two
You don't have to use double quotes with numeric columns just where you
think the data might have commas.
What appears to be 4 single quotes in my exable are infact two single quotes
enclosing a double quote
Cheers
Lawrence
Rob Diaz wrote in message ...
>How does one go about exporting an ASCII text file representation of a
table
>from Oracle 8? (specifically, 8.0.6). We need this file to be able to
>import again (eventually) using sql*loader, as well as excel and other
>tools.
>
>Thanks in advance!
>Rob
>
>
Received on Mon Feb 05 2001 - 21:09:59 CST