Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to copy a table into a file in specific format

Re: How to copy a table into a file in specific format

From: Jean-Philippe Squelbut <squelbut_at_csi.com>
Date: Wed, 30 Sep 1998 09:04:02 +0200
Message-ID: <OUo9AEE79GA.297@ntdwwaaw.compuserve.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US