|
Re: load data from table outside of block into non db item [message #668839 is a reply to message #668793] |
Fri, 16 March 2018 14:21 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Code you should use is the same as the one you'd use in (PL/)SQL to retrieve values from some table, using the appropriate WHERE condition.
Why did I mention both SQL and PL/SQL? Because you should first test it in SQL*Plus (or any other tool you use to access the database), such as
select mtitle, fee, ...
from some_table
where mcode = :some_mcode;
Once you're satisfied with it, copy/paste it into Forms, but - as Forms is PL/SQL, include the INTO clause and - instead of a parameter - use item's name (along with the data block it belongs to), such as
select mtitle, fee, ...
into :student.mtitle, :student.fee, ... --> this ...
from some_table
where mcode = :student.mcode; --> ... and this
|
|
|