LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Executing Oracle Functions

    Employee
    Posted 05-17-2010 12:24

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: raylee

    Hi. I know how to execute stored procedures from Brain but how to you run functions and get the return value to be used later on? Thanks!


  • 2.  RE: Executing Oracle Functions

    Employee
    Posted 05-18-2010 06:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    I'm taking an example I quickly found using Google and adapting it. The example I'm starting with is from: http://www.exforsys.com/tutorials/or...nctions/1.html

    Just like is described on that page, you have to use a select statement to return the value to Brain and in this way it is not different from the example.

    Using sqlplus I quickly created a function:
    SQL> create or replace function fun1 return varchar2 is
    2 begin
    3 return 'Hellow Friends ...';
    4 end;
    5 /

    Then to execute it I used a DB Query node with the following code in the SqlQuery parameter:
    select fun1 from dual

    Hopefully this gets you started.