Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    10

    Unanswered: Stored procedure errors.Please help

    Here's my stored procedure.

    create or replace procedure BANKREC.BS_GETLOOKUP_TABLEID_COLUMNID
    (table_name varchar2, column_name varchar2, tableid OUT NUMBER)
    AS
    BEGIN
    SELECT table_id into tableid from bankrec.bs_luprops
    where x = -1 and NAME = table_name;
    END;


    Here's how i'm running it.
    execute BS_GETLOOKUP_TABLEID_COLUMNID
    ('JPMC_Clearing_Account_Processing_Flags','Process Date',:tableid)


    I'm getting the below error when running it.
    SP2-0552: Bind variable "TABLEID" not declared.

    Please help me where's wrong.
    Tks in advance,
    Rag

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking


    Maybe you need to "declare" tableid?
    Code:
    create or replace procedure BANKREC.BS_GETLOOKUP_TABLEID_COLUMNID 
    (table_name varchar2, column_name varchar2, tableid OUT NUMBER)
    AS
    DECLARE TableId Varchar2(32);
    BEGIN
    SELECT table_id into tableid from bankrec.bs_luprops 
    where x = -1 and NAME = table_name;
    END;

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    May 2004
    Posts
    10
    declaring the variable give me compile errors.

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking


    Ooops, sorry. I missread the create statement.
    Remove the "declare tableid", re-create as before and try to execute like this:
    Code:
    var tableid varchar2(40);
    execute BS_GETLOOKUP_TABLEID_COLUMNID ('JPMC_Clearing_Account_Processing_Flags','Process Date',:tableid);
    print :tableid


    PS: Next time post the error.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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