Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NVL function 1

Status
Not open for further replies.

howzatUK

IS-IT--Management
Oct 14, 2005
23
GB
Can anyone please tell me why the following procedure does not work?

I have tried everything, and it just wont work, compilation messages in the past have stated that it requires an 'INTO' clause, but adding this makes no difference and only produces another compilation error. PLEASE HELP?????????

CREATE OR REPLACE PROCEDURE GenNewActionKeys
AS
inewKey number;
BEGIN
inewKey:= max NVL(actionkey,0)+1 from dcactkey;
END;
 
Code:
CREATE OR REPLACE PROCEDURE GenNewActionKeys
AS
  inewKey number;
BEGIN
  SELECT max(NVL(actionkey,0))+1
  INTO  inewKey
  from   dcactkey;
END;
 
Thankyou, obviously when i said i tried everything, i hadnt tried that combination. Thanks so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top