Try this:
---------------------------------------- --BUSINESS PARTNER --zip code validation if (@object_type='2') and (@transaction_type in (N'A', N'U')) begin if ((select isnull(OCRD.U_CodPost,'@') from OCRD where OCRD.CardCode=@list_of_cols_val_tab_del) = '@') begin set @error_message='Can''t create/update BP without ZIP CODE' set @error=1111 end end
Kind regards,
JC