query multiple rows from one [message #604338] |
Sat, 28 December 2013 23:16 |
|
alhanashi
Messages: 7 Registered: December 2013
|
Junior Member |
|
|
hi
as the image
there is to block in my form first one BLK_LPO when i press F9 in LPO_NO query LPO details it will get from table
LPO ( LPO_ID , LPO_NO , LPO_DT, COMPANY_ID, INVOICE_NO,INVOICE_DT, DELIVERY_NO, DELIVERY_DT )
now i want details to come to second block MODELS from table
MPDELS ( M_ID, NAME, RAM, HDD, PROCESS, LPO_ID, WARRANTY, D_TYPE)
where MODELS.LPO_ID = :BLK_LPO.LPO_ID
can any one help me
thanks
-
Attachment: ORACLE.png
(Size: 106.12KB, Downloaded 1493 times)
|
|
|
Re: query multiple rows from one [message #604346 is a reply to message #604338] |
Sun, 29 December 2013 02:23 |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
Creat a button and put that code in when_button_pressed
declare
v_a number;
v_b varchar2(300);
cursor xyz is select (M_ID, NAME, RAM, HDD, PROCESS, LPO_ID, WARRANTY, D_TYPE)
from Models
where MODELS.LPO_ID = :BLK_LPO.LPO_ID
order by m_id;
begin
open xyz;
loop
fetch xyz into v_a,v_b;
exit when xyz%notfound;
:TEST1.TSTUID:= v_a;
:TEST1.TN := v_b;
NEXT_RECORD;
end loop;
close xyz;
end;
replace some code with your exact fields.
|
|
|
|
|
|
|
|
Re: query multiple rows from one [message #604446 is a reply to message #604417] |
Mon, 30 December 2013 12:18 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Too much typing for nothing. If you insist, what's wrong with just
in the first two triggers?
Also, I'm curious what would that "update" button do.
|
|
|