Hi,
Try this:
IF @transaction_type = 'U' AND @object_type = '97'
Begin
IF exists(select T0.[OpprId] from OOPR T0 where T0.SlpCode != '-1'
and T0.UserSign != '6')
BEGIN
SET @error = 1
SET @error_message = N'Authorisation required'
END
END
Thanks & Regards,
Nagarajan