I'm trying to convert a number of SQL Server stored procedures into MySQL st

I'm trying to convert a number of SQL Server stored procedures into MySQL stored procedure, which will be called using the Stored Procedure smart node. Unfortunately if I try and include error processing they fail to create a stored proc, but if I remove the error handling the stored proc is created.

An example of one of the SQL Server stored procs is:

CREATE PROCEDURE [CM].[SPUPDATEUSERID]
          @pincustomerReference varchar(20),
          @pinuserId varchar(15),
          @pinstatus int
AS
BEGIN
          -- SET NOCOUNT ON added to prevent extra result sets from interfering with INSERT statements.
          SET NOCOUNT ON;

          -- Insert statements for procedure here
          UPDATE CM.GenericDemandData
          SET userId = @pinuserId, status = @pinstatus
          WHERE customerReference = @pincustomerReference
          AND userId = ''

          IF @@ERROR <> 0
                              RETURN 1
END

MySQL version where I've attempted to put error handling in

CREATE DEFINER = `appian` @`%` PROCEDURE `CM_SPUPDATEUSERID`(
          IN `pincustomerReference...

OriginalPostID-160498

OriginalPostID-160498

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data