|
|
|
Re: multiple rows select in interactive grid using FOR LOOP [message #689163 is a reply to message #689138] |
Fri, 29 September 2023 01:36 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
OK.
So, you have two tables: one that already contains rows you need, and another one which will "accept" rows from the 1st table. The 2nd table is (I presume) base table for the interactive grid region.
How about the following approach?
- create a button (let's call it P1_BTN_COPY)
- create a process which will "copy" data from one table to another; I presume that there should also be some page items which will help in identifying rows that should be copied. Process should fire only when P1_BTN_COPY is pressed
- write code which does that, e.g.
insert into table_2 (id, name, address, amount)
select id, name, address, amount
from table_1
where code = :P1_CODE
and year = :P1_YEAR;
- submit would refresh the page and cause interactive grid to be populated; make sure to include appropriate WHERE clause in grid's properties, otherwise you'll get all rows from the 2nd table, and that's probably not what you want
|
|
|
|
|