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

Home -> Community -> Usenet -> c.d.o.misc -> Interesting Insert?

Interesting Insert?

From: <yliu_at_creighton.edu>
Date: Wed, 26 Jan 2000 11:56:17 -0600
Message-ID: <Pine.HPP.3.95.1000126114553.10961B-100000@penguin.creighton.edu>


Hi,

I have a SQL command file, in my file, first I create a temp table using

	Create table temp (company_no number(2),
		   dept       varchar2(4),
		   ......)
then I inserted into this temp table using 
	Insert into temp select unique ....
			 from my another table,

then I do reporting based on the temp table. While I was watching the command file run, after the insert, it told me that 52 rows created. However, when I select count(*) from temp table, there are 104 rows in there. I was puzzled, so I tried this three time, every time using different selection criteria in my where clause in the INSERT statement above, every time the temp table seem to have twice as many rows as the rows said being created by the insert statement. And the rows in the temp table are dupped up! I was wondering if this ever happened to some body else. I could not figure out why it does this. Could somebody give me some advice?

Thank you very much for your time.

Yongge
yliu_at_creighton.edu Received on Wed Jan 26 2000 - 11:56:17 CST

Original text of this message

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