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: using 10g express UI....

Re: using 10g express UI....

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 10 May 2007 10:36:58 -0700
Message-ID: <1178818618.138349@bubbleator.drizzle.com>


gazzag wrote:

> On 9 May, 22:57, user <some..._at_someplace.org> wrote:

>> Trying to insert multiple rows. Have determined Oracle 10g UI will
>> require me to enter only one row at a time as following:
>>
>> insert into committee (cccb_id, com_name) values (500 ,'Historic
>> Preservation Commission');
>> then next row
>>
>> insert into committee (cccb_id, com_name) values (550 ,'Improvements and
>> Service Committee');
>> then next row
>>
>> insert into committee (cccb_id, com_name) values (600 ,'Mayors
>> Beautification Committee');
>> then next row
>>
>> First, is this correct. The insert statement will allow only one row at
>> a time.
> 
> Correct.  One INSERT statement inserts one row.  As documented here:
> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#i2163698

With respect to that doc and that demo that is correct. But with respect to Oracle it is not correct. For example:

INSERT ALL
WHEN (deptno=10) THEN

   INTO emp_10 (empno,ename,job,mgr,sal,deptno)    VALUES (empno,ename,job,mgr,sal,deptno) WHEN (deptno=20) THEN

   INTO emp_20 (empno,ename,job,mgr,sal,deptno)    VALUES (empno,ename,job,mgr,sal,deptno) WHEN (deptno<=30) THEN

   INTO emp_30 (empno,ename,job,mgr,sal,deptno)    VALUES (empno,ename,job,mgr,sal,deptno) ELSE
   INTO leftover (empno,ename,job,mgr,sal,deptno)    VALUES (empno,ename,job,mgr,sal,deptno) SELECT * FROM emp;

or

  INSERT FIRST
WHEN customer_id < 'I' THEN

   INTO cust_ah
   VALUES (customer_id, program_id, delivered_date) WHEN customer_id < 'Q' THEN

   INTO cust_ip
   VALUES (customer_id, program_id, delivered_date) WHEN customer_id > 'PZZZ' THEN

   INTO cust_qz
   VALUES (customer_id, program_id, delivered_date) SELECT program_id, delivered_date, customer_id, order_date FROM airplanes;

and there are many others.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu May 10 2007 - 12:36:58 CDT

Original text of this message

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