Hi,
Try this:
IF (@object_type = '30') and (@transaction_type IN (N'A'))
BEGIN
IF EXISTS (
SELECT TRANSID FROM OJDT A WHERE TransId = @list_of_cols_val_tab_del)
BEGIN
Select @error = 10, @error_message = N'You are not authorize to add this JE'
END
END
Thanks & Regards,
Nagarajan