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: SQL 'DUMP' From Oracle - How?

Re: SQL 'DUMP' From Oracle - How?

From: <jtesta_at_my-dejanews.com>
Date: Thu, 28 May 1998 16:21:34 GMT
Message-ID: <6kk2ud$g34$1@nnrp1.dejanews.com>


If you want a sql*loader type formatted file, go to my web page and get the sql*unloader utility written Jared Still(the new oracle-l listowner), or you can do it via sql written to product sql. Here is a rudimentary one.

set pagesize 0
set feedback off
spool filename.spl
select 'insert into '||table_name||' values('||column_1||','||column_2||');' from table_name
spool off

then you can use that as an input.sql file. be sure to replace table_name with the table you want to get the data from. It gets more complicated when dealing with varchar/char fields as you will need ' around them but you get the idea.

joe
http://www.oracle-dba.com

In article <35655ac9.10728966_at_news.supernews.com>,   mark_tortolano_at_dial.pipex.com (Mark Tortolano) wrote:
>
> Hi there,
>
> I'm trying to dump the contents of a table, in order to create a
> series of SQL INSERT statements. I know the functionality of Export,
> but I just want to create INSERT statements, not an Oracle-specific
> binary.
>
> How do I do this? Is the only way to create a (fiddly) SQL*Plus
> report, using headings, separators, etc, or is there a better way?
>
> Thanks,
>
> Mark Tortolano
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu May 28 1998 - 11:21:34 CDT

Original text of this message

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