Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2011
    Posts
    7

    Unanswered: stored procedure help

    i want to write stored procedure to return bp_praccno char(5) and bp_prname char(20) values from the table called bt_provider. how can i do that?? pls help me. thank u

  2. #2
    Join Date
    Mar 2011
    Posts
    7
    name of the database is "hdfc" and returning two things are a account number and a provider name. thanks

  3. #3
    Join Date
    Sep 2010
    Location
    Germany, Brunswick
    Posts
    55
    Code:
    create procedure test () returning char(5), char(20);
      define bp_praccno char(5);
      define bp_prname char(20);
      foreach c1 for
        select customer_num, lname into bp_praccno,bp_prname from bt_provider
        return bp_praccno, bp_prname  with resume;
      end foreach;
    end procedure;
    
    select bp_praccno, bp_prname 
    from table(test())(bp_praccno,bp_prname)
    where bp_praccno > 110;
    Didn't test but should work.
    WilhelmW

  4. #4
    Join Date
    Mar 2011
    Posts
    7
    thank u sir, but it gives me a error
    674: Routine (get_provider) can not be resolved.
    111: ISAM error: no record found.
    what u mean by customer_num and lname in ur procedure ??
    what s the meaning of where bp_praccno > 110;??
    Last edited by dushan1987; 03-22-11 at 00:50.

  5. #5
    Join Date
    Sep 2010
    Location
    Germany, Brunswick
    Posts
    55
    Sorry

    Code:
    create procedure test () returning char(5), char(20);
      define bp_praccno char(5);
      define bp_prname char(20);
      foreach c1 for
        select bp_praccno,bp_prname into bp_praccno,bp_prname from bt_provider
        return bp_praccno, bp_prname  with resume;
      end foreach;
    end procedure;
    
    select bp_praccno, bp_prname 
    from table(test())(bp_praccno,bp_prname)
    where bp_praccno > 110;
    WilhelmW

  6. #6
    Join Date
    Mar 2011
    Posts
    7
    thank u very much

Posting Permissions

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