Subject RE: [firebird-support] Problems trying to create Stored Procedure
Author Jerry Sands

Change “SUSPEND#” to “SUSPEND;”

 

 

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of jim.rhema316@...
Sent: Friday, November 01, 2013 11:23 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Problems trying to create Stored Procedure

 

 

Good afternoon.

 

Thank you for taking the time to help me on this.  I am new to creating and using Stored Procedures so please bear with me.

 

I am trying to create this stored procedure:

 

SET TERM #;

CREATE PROCEDURE FindSalesAmt(Name VARCHAR(20)) RETURNS (price decimal(18,2), id bigint,

 description VARCHAR(90)) AS

BEGIN 

  SELECT startprice, itemid, title from ebayrevisefile

  WHERE price > 20.00

  INTO :price, :id, :description;

  SUSPEND#

END#

SET TERM ;#

GRANT EXECUTE ON PROCEDURE FindID to PUBLIC WITH GRANT OPTION;

  suspend;

end

 

And when I compile it I get an error on the set term.  As I understand it the ; is a terminator so I need to use a different one within the procedure.

 

Any help on this is appreciated.  I am using Firebird 2.5 with DBVisualizer Pro 9.0.3. 

 

Thank you!