This discussion is archived
2 Replies Latest reply: Feb 20, 2013 7:13 PM by 927588 RSS

Multiple rows insertion - need help

927588 Newbie
Currently Being Moderated
Hello all,

I need to insert multiple rows in the table with a single query and the number of rows is 269470.
Here one of the columns is determined by another sub query which returns multilple rows and the other 2 columns remain same for all.

I came up with the following query but need a loop to make it run multiple time(269470 times).

insert into EMLUSRRECV
(user_id, storeent_id, receiveml)
values
(+(select user_id from users where user_id not in (select distinct user_id from EMLUSRRECV) and CURR = 'USD' and rownum = 1)+, 11154, 1);

Thanks in advance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points