Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to copy a table into a file in specific format
sqlplus <user/password> -s <<EOD > filename 2>&1
set head off pages 0 feedb off
select f1||'|'||f2||'|'||f3 from table;
exit
EOD
Where f1, f2, f3 are your column names,
'|' the character between quotes you want to write in your file || the way to concatenate in sql.
badstreetboy_at_my-dejanews.com a écrit dans le message
<6us1j1$osf$1_at_nnrp1.dejanews.com>...
>I want to copy the entire table into a unix file in this format:
>f1|f2|f3
>...
>How to do that? Thanks!
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Wed Sep 30 1998 - 02:04:02 CDT