IF ((@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '73') |
declare @CardCode as nvarchar(25)
declare @Substitute as nvarchar(25)
BEGIN
set @CardCode = (select top 1 T1.CardCode from OSCN T1 where T1.CardCode=@list_of_key_cols_tab_del)
set @Substitute = (Select top 1 T2.Substitute from OSCN T2 where T2.Substitute =@list_of_key_cols_tab_del)
| @CardCode | |
| @Substitute |
IF EXISTS(SELECT Distinct T4.Substitute FROM [OSCN] T4 Join OCRD T5 on T4.CardCode = T5.CardCode
| WHERE T5.CardType = 'S' and T4.CardCode=@CardCode and T4.Substitute=@Substitute) | |||||
BEGIN
| SELECT @error = 203 | |
| SELECT @error_message = 'Duplicate Vendors Catalog ' |
END
END
--END
Att
Denilson Rezende