I am facing a very strange problem. one of my client server, there is problem in sql tables. In some tables column there have automatically html div added with specific link, for more understanding i have attached screen shots for the same.
I have already read this below question, Sql Injection : Data Appended automatically to table column but all in vain. May be this is sql injection so i need a proper solution.
Below is my sql Code
if not exists (select Request_id from T0040_Change_Request_Master where Cmp_Id = @Cmp_ID and Request_type = 'Birthdate Change')
begin
declare @Request_id1 numeric
select @Request_id1 = isnull(MAX(Tran_id),0) + 1 from T0040_Change_Request_Master
INSERT INTO T0040_Change_Request_Master (Tran_id,Request_id,Request_type,Cmp_ID)VALUES(@Request_id1,1,'Birthdate Change',@Cmp_ID)
end
if not exists (select Request_id from T0040_Change_Request_Master where Cmp_Id = @Cmp_ID and Request_type = 'Branch Change')
begin
declare @Request_id2 numeric
select @Request_id2 = isnull(MAX(Tran_id),0) + 1 from T0040_Change_Request_Master
INSERT INTO T0040_Change_Request_Master (Tran_id,Request_id,Request_type,Cmp_ID)VALUES(@Request_id2,2,'Branch Change',@Cmp_ID)
end
if not exists (select Request_id from T0040_Change_Request_Master where Cmp_Id = @Cmp_ID and Request_type = 'Shift Change')
begin
declare @Request_id3 numeric
select @Request_id3 = isnull(MAX(Tran_id),0) + 1 from T0040_Change_Request_Master
INSERT INTO T0040_Change_Request_Master (Tran_id,Request_id,Request_type,Cmp_ID)VALUES(@Request_id3,3,'Shift Change',@Cmp_ID)
end
if not exists (select Request_id from T0040_Change_Request_Master where Cmp_Id = @Cmp_ID and Request_type = 'Marital Status Change')
begin
declare @Request_id4 numeric
select @Request_id4 = isnull(MAX(Tran_id),0) + 1 from T0040_Change_Request_Master
INSERT INTO T0040_Change_Request_Master (Tran_id,Request_id,Request_type,Cmp_ID)VALUES(@Request_id4,4,'Marital Status Change',@Cmp_ID)
end