Oracle Forms (MOSC)

MOSC Banner

How to pass Table Name to a Function (in Form side / Client Side) ?

edited Aug 15, 2010 8:43AM in Oracle Forms (MOSC) 2 commentsAnswered
I am calling the function with the <Table Name>  i.e. 'ST_CONTACTS'  as parameter, as below:-

ll_seq_no number(8,0);

 ll_seq_no := FUNC_SEQ_NO('ST_CONTACTS');
 

My Function as follows:-

FUNCTION FUNC_SEQ_NO (ls_table_name IN varchar2)
RETURN NUMBER IS
ll_seq_no Number(8,0);
BEGIN
   declare
    ll_cnt Int;  

   begin
       ll_seq_no := 0;
       select nvl(max(seq_no),0)
       into ll_seq_no
       from ls_table_name ;
      
       ll_seq_no := ll_seq_no + 1;
   end;
   Return ll_seq_no;
END;

It does NOT work..  Oracle does not like 'ls_table_name' as a table name. How to fix it? 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center