[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::rdb_60

Title:Oracle Rdb - Still a strategic database for DEC on Alpha AXP!
Notice:RDB_60 is archived, please use RDB_70..
Moderator:NOVA::SMITHISON
Created:Fri Mar 18 1994
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5118
Total number of notes:28246

4953.0. "Stored procedures in 2PC" by chsr38.ch.oracle.com::ROHR (Oracle Rdb support Switzerland) Thu Jan 23 1997 09:07

T.RTitleUserPersonal
Name
DateLines
4953.1NOVA::SMITHIDon't understate or underestimate Rdb!Thu Jan 23 1997 10:233
4953.2Here is the real stuffchsr38.ch.oracle.com::ROHROracle Rdb support SwitzerlandThu Jan 23 1997 11:09210
4953.3NOVA::SMITHIDon't understate or underestimate Rdb!Thu Jan 23 1997 23:1618
It still isn't clear to me, but I think you are creating the stored procedure
at runtime.  I think you want the alias on the module name during the
create...

CREATE db2.MODULE MTESTST LANGUAGE SQL 
   PROCEDURE Ptestst (:dbkey char(8) ); 
     BEGIN 
     UPDATE employees set state = 'BY'  WHERE employee_id = :dbkey; 
     END; 
END MODULE; 

This will create the module in that database.  I also expect that you can use
the alias on the call statement (even though I haven't tried this).

If you can't get this working please submit a BUG report with database
definitions as well as a full script to compile and link.,

Ian
4953.4CHSR36::LCONSMon Jan 27 1997 05:0319
The exact syntax is:

CREATE MODULE db2.MTESTST LANGUAGE SQL
              ^^^ 
   PROCEDURE db2.Ptestst (:dbkey char(5)); 
             ^^^
     BEGIN 
     UPDATE employees set state = 'BY'  WHERE employee_id = :dbkey; 
     END; 
END MODULE;

After that a 

CALL db2.Ptestst (:dbkey) is working fine.

Thank's

Louis and Regina 

4953.5can we please document this?141.148.22.23::ROHROracle Rdb support SwitzerlandMon Jan 27 1997 06:3210
    Well, great!!!!!!!!!!
    
    Should I log a documentation bug as we were not able to dig this out
    of the documentation or is someone from the docu group listening (with
    their eyes...)?
    
    thanks,
    Regina 
    
    
4953.6NOVA::SMITHIDon't understate or underestimate Rdb!Mon Jan 27 1997 10:585
Please submit a documentation BUG report.

thanks,

Ian
4953.7CHSR36::LCONSMon Jan 27 1997 11:344
Also we have to hardcode the alias when we create the procedure.
And we can use it only with the alias...

Louis
4953.8No alias needed in procedure definitionchsr38.ch.oracle.com::ROHRThe Packers did it!Wed Jan 29 1997 07:405
    In fact, as it turns out, there is no need to define the module and the
    procedure with an alias, it is sufficient if you call the procedure
    with an alias.
    
    /Regina