Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Location
    Ontario
    Posts
    8

    Question Unanswered: How to return a result from a procedure?

    I created a procedure to select data. It works fine on SQLPlus. but I can't get any result from front-end which implemented in Coldfusion.
    Does any one have an idea how to return a set values from a procedure?
    Your reply is appreciate.

  2. #2
    Join Date
    Aug 2003
    Posts
    1
    You can do something like this...

    CREATE OR REPLACE PROCEDURE ProcA
    (a_dMonth IN DATE,
    a_nStatus OUT NUMBER
    )
    AS

    Now call the procedure in a sql script...

    declare
    nStatus Number :=0;
    e_exception EXCEPTION;
    begin
    ProcA(to_date(&&1,'yyyymmdd',nStatus);
    if nStatus > 0 then
    dbms_output.put_line('yr message '||nStatus);
    raise e_exception;
    end if;
    EXCEPTION
    when e_exception then
    null;
    end;
    /

  3. #3
    Join Date
    Aug 2003
    Location
    Ontario
    Posts
    8

    Talking

    Thanks, I got it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •