Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> OK... maybe I'm being stupid... HELP

OK... maybe I'm being stupid... HELP

From: Nick Bull <nick_at_imat.demon.co.uk>
Date: Mon, 5 Jul 1999 15:18:09 +0100
Message-ID: <931184371.2352.0.nnrp-09.d4e48d0d@news.demon.co.uk>


Hi.

I might be really stupid here, but I can't seem to work out what I'm doing wrong.

I'm trying to create a stored procedure that I can call from an external program. This procedure will accept two parameters and return one further parameter. I want to be able to pass in some value to match on, and a value for the table name.

e.g.
I have a database that contains one table per bank (this is a big group of bank's database). I want to know how many customers that bank with Mildew bank have the surname Jones.

CREATE OR REPLACE PROCEDURE HowManyCustomers

               ( BankName IN VARCHAR2,
                 Surname IN VarChar2,
                 HowMany OUT NUMBER ) IS
BEGIN
   HowMany := SELECT COUNT(*) FROM BankName
                   WHERE CustomerSurname = Surname;
END; What am I doing wrong ?... I keep getting errors on this script, but I can't find anything that is helpful in the documentation or in the books I've got.

Cheers,

NIck. Received on Mon Jul 05 1999 - 09:18:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US