query multiple rows from one [message #604338] |
Sat, 28 December 2013 23:16 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c8b0d93b066c6c5c5726eb6385ef54df?s=64&d=mm&r=g) |
alhanashi
Messages: 7 Registered: December 2013
|
Junior Member |
|
|
hi
as the image
![/forum/fa/11509/0/](/forum/fa/11509/0/)
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 1420 times)
|
|
|
Re: query multiple rows from one [message #604346 is a reply to message #604338] |
Sun, 29 December 2013 02:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzad-ul-hasan
Messages: 625 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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 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.
|
|
|