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: Duplicate inserts but only through sqlplus

Re: Duplicate inserts but only through sqlplus

From: Anoop <anoopkumarv_at_gmail.com>
Date: 11 Apr 2007 20:31:12 -0700
Message-ID: <1176348672.820888.188840@n59g2000hsh.googlegroups.com>


On Apr 11, 7:02 pm, "joel garry" <joel-ga..._at_home.com> wrote:
> On Apr 11, 1:06 pm, "Anoop" <anoopkum..._at_gmail.com> wrote:
>
> > SQL> set echo on
> > SQL> set feedback on
> > SQL> set verify on
> > SQL> @c:/WSA_Domains_AM_april9.sql
> > SQL> SET SCAN OFF
> > SQL>
> > SQL> insert into applications values ('WSA','Windows Server
> > Admin','Windows Server Admin');
> > 1 row created.
> > SQL>
> > SQL> /* Domains */
>
> [snip]
>
>
>
> > By Duplicates I mean that the data in some rows repeat in this step:
> > insert into application_data values ((select max(application_data_id)
> > +1 from application_data), 'WSA', 'Domain', 'cof.ds.xxx.com ', null,
> > 0);
>
> > So basically we find (after running the file) that cof.ds.xxx.com
> > repeated twice instead of once. The file has only one row with the cof
> > value - I am sure of that.
>
> SQL> select * from dual;
>
> D
> -
> X
>
> SQL> /*
> DOC>*/
> SQL> / *
>
> D
> -
> X
>
> SQL>
>
>
>
> > We have about 3000 insert statements in all. By putting commit
> > statements in between we seem to reduce the number of duplicates, but
> > I fail to see how that would help. Is it really necessary to add a
> > commit after a specified number of inserts??
>
> jg
> --
> @home.com is bogus.
> New in 11g: oracle flashmobhttp://www.tokyomango.com/tokyo_mango/2007/04/video_cosplayer.html

Thanks so much..... Sybrand Bakker, Thomas Kellerer, Joel Garry:

You might have just hit the problem on the head. Of course / means to run what is in the buffer and since commit does a commit of the transaction and clears the buffer, we faced some improvement when we used the commit's in between.

Thank you all - the problem is solved - although I would have expected Oracle Sqldeveloper (Raptor) to be at least similar if not more forthcoming in its messages.
Also reading through Oracle's faq, comments need to be added using -- and not really /* XX */

Thank you all so much,
Anoop Received on Wed Apr 11 2007 - 22:31:12 CDT

Original text of this message

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