I did create a “transactional based replication” and I used “Billet” as one of the articles (tables). The publisher database is “NGBCST” and the subscriber one is “rpl_NGBCST” (both are on the same server). DB “rpl_NGBCST” is meant to keep track of any changes (inserts or updates) on “NGBCST” . By that I mean, that in “insertion” in “NGBCST” is inserted into “rpl_NGBCST”; an update in “NGBCST” is not an update to “rpl_NGBCST” but an insertion. I noticed that the corresponding “Billet” table in the subscriber DB has the following three (delete, insert, update) stored procedures. In the scheme of my application, I do not want to do an update or a delete in the table in the “subscriber DB”. That means that I have to modify "sp_MSupd_Billet"; I also have to wipe out "sp_MSdel_Billet".

When I tried to modify Update as shown below in “Modified UPDATE”, I ran into trouble.
___________________DELETE (generated for me by replication) ---------------------

create procedure "sp_MSdel_Billet" @pkc1 int
as
delete "Billet"
where "BilletID" = @pkc1

_________________ INSERT (generated for me by replication) ---------------------

create procedure "sp_MSins_Billet" @c1 int,@c2 varchar(40),@c3 varchar(255),@c4 datetime,@c5 int
as
insert into "Billet" values ( @c1,@c2,@c3,@c4,@c5 )

________________ UPDATE (generated for me by replication) ---------------------

create procedure "sp_MSupd_Billet"
@c1 int,@c2 varchar(40),@c3 varchar(255),@c4 datetime,@c5 int,@pkc1 int
,@bitmap binary(1)
as
if substring(@bitmap,1,1) & 1 = 1
update "Billet" set
"BilletID" = case substring(@bitmap,1,1) & 1 when 1 then @c1 else "BilletID" end
,"BilletName" = case substring(@bitmap,1,1) & 2 when 2 then @c2 else "BilletName" end
,"Description" = case substring(@bitmap,1,1) & 4 when 4 then @c3 else "Description" end
,"DateTimeStamp" = case substring(@bitmap,1,1) & 8 when 8 then @c4 else "DateTimeStamp" end
,"UpdaterID" = case substring(@bitmap,1,1) & 16 when 16 then @c5 else "UpdaterID" end
where "BilletID" = @pkc1
else
update "Billet" set
"BilletName" = case substring(@bitmap,1,1) & 2 when 2 then @c2 else "BilletName" end
,"Description" = case substring(@bitmap,1,1) & 4 when 4 then @c3 else "Description" end
,"DateTimeStamp" = case substring(@bitmap,1,1) & 8 when 8 then @c4 else "DateTimeStamp" end
,"UpdaterID" = case substring(@bitmap,1,1) & 16 when 16 then @c5 else "UpdaterID" end
where "BilletID" = @pkc1

___________________MODIFIED UPDATE (wtitten by me)----------------------------

/*
MMk this one works up to a point; it adds those columns that have been altered. For the one that have not been altered, blanks are inserted.which can be a problem.

create procedure "sp_MSupd_Billet"
@c1 int,@c2 varchar(40),@c3 varchar(255),@c4 datetime,@c5 int,@pkc1 int
,@bitmap binary(1)
as
insert into "Billet" values ( @c1,@c2,@c3,@c4,@c5 )
*/

create procedure "sp_MSupd_Billet"
@c1 int,@c2 varchar(40),@c3 varchar(255),@c4 datetime,@c5 int,@pkc1 int
,@bitmap binary(1)

as

DECLARE @BilletID_Insert int,
@BilletName_Insert varchar(40),
@Description_Insert nvarchar(255),
@DateTimeStamp_Insert datetime,
@UpdaterID_Insert int

if substring(@bitmap,1,1) & 1 = 1
--update "Billet" set
@BilletID_Insert = case substring(@bitmap,1,1) & 1 when 1 then @c1 else "BilletID" end
@BilletName_Insert = case substring(@bitmap,1,1) & 2 when 2 then @c2 else "BilletName" end
@Description_Insert = case substring(@bitmap,1,1) & 4 when 4 then @c3 else "Description" end
@DateTimeStamp_Insert = case substring(@bitmap,1,1) & 8 when 8 then @c4 else "DateTimeStamp" end
@UpdaterID_Insert = case substring(@bitmap,1,1) & 16 when 16 then @c5 else "UpdaterID" end
--where "BilletID" = @pkc1
else
--update "Billet" set
@BilletName_Insert = case substring(@bitmap,1,1) & 2 when 2 then @c2 else "BilletName" end
@Description_Insert = case substring(@bitmap,1,1) & 4 when 4 then @c3 else "Description" end
@DateTimeStamp_Insert = case substring(@bitmap,1,1) & 8 when 8 then @c4 else "DateTimeStamp" end
@UpdaterID_Insert = case substring(@bitmap,1,1) & 16 when 16 then @c5 else "UpdaterID" end
--where "BilletID" = @pkc1

INSERT NGBCST.dbo.Billet (BilletID, BilletName, Description,DateTimeStamp,UpdaterID) VALUES (@BilletID_Insert,
@BilletName_Insert,
@Description_Insert,
@DateTimeStamp_Insert,
@UpdaterID_Insert)