We are currently running SonarQube Server 2025.1.1 LTA whereas an application team scan their SQL scripts. A piece of code in a lengthy sql file is given below. While analyzing the sql file, since there are insert and exec commands were repeated several times, SonarQube flagged them as duplicate. How to get this duplication issue resolved?
declare @dfid int
exec datafileDel '2669',1
insert into datafiles (firmid,filetype,delimiter) values (2669,1,null)
set @dfid = SCOPE_IDENTITY()
insert into process_datafiles ( pruniqueid, dfuniqueid )
select prid, @dfid
from @t
declare @clid2021 int
insert into columnlocation (colstart, colend, colorder, dfuniqueid, colname) values (11,18,11,@dfid,'cusip')
set @clid2021 = SCOPE_IDENTITY()
insert into columnformat (dcuniqueid,cluniqueid,formatid,formatorder,param) values (null,@clid2021,506,19,null)
declare @clid2022 int
insert into columnlocation (colstart, colend, colorder, dfuniqueid, colname) values (181,212,23,@dfid,'ticker')
set @clid2022 = SCOPE_IDENTITY()
Appreciate your help in advance!