cancel
Showing results for 
Search instead for 
Did you mean: 

Modify the SPT

pvinod_kumar
Participant
0 Kudos
97

Dear Experts

I need to a help to modify the attached SPT in SQL

now as per this SPT , all types of data, numeric or alpha or special char is blocking.

Where i need only to block the Numbers

if any user try to enter the LicNum (max 20 Numbers)in BP Master date same as other, it should not be allowed

Regards

Vinod

if @object_type='2' and (@transaction_type='A' or @transaction_type='U')  Begin


declare @VAR1 INT; 
declare @VARTAX NVARCHAR(254); 


select @VARTAX = T0."LicTradNum" 
from "OCRD" T0  
 where T0."CardCode"   = @list_of_cols_val_tab_del ;
 
 select @VAR1 = count(*)
 from "OCRD" T0  
 where 
 T0."LicTradNum" = @VARTAX
 and T0."CardCode"   <> @list_of_cols_val_tab_del ;


       if @VAR1 > 0 begin
           set @error = -111;
           set @error_message ='BP with same Tax ID Already Exists Or Same BP Already Exist, Pls check the DB Or Contact Finance Dept';
      end;


end;

Accepted Solutions (0)

Answers (0)