Keeper Id:
Loser Id:
insert into tbl_BID_BidManufacturers ( ownerId, ownerType, bidMfrId, bidId, priceRequestSent, mfrBidNumber, bidContactId ) select ownerId, ownerType, bidMfrId, #_keeperId#, priceRequestSent, mfrBidNumber, bidContactId from tbl_BID_BidManufacturers bma where not exists ( select * from tbl_BID_BidManufacturers bmb where bmb.bidId = and bmb.bidMfrId = bma.bidMfrId ) and bma.ownerId = and bma.ownerType = and bma.bidId = update tbl_BID_BidManufacturers set ownerId = * -1, ownerType = where ownerId = and ownerType = and bidId = update tbl_BID_Bidlines set bidId = where ownerId = and ownerType = and bidId = insert into tbl_BID_BidDistributors ( ownerId, ownerType, bidDstId, bidId, dstBidRef, autoLinkNewProducts, bidContactId ) select ownerId, ownerType, bidDstId, #_keeperId#, dstBidRef, autoLinkNewProducts, bidContactId from tbl_BID_BidDistributors bma where not exists ( select * from tbl_BID_BidDistributors bmb where bmb.bidId = and bmb.bidDstId = bma.bidDstId ) and bma.ownerId = and bma.ownerType = and bma.bidId = update tbl_BID_BidDistributors set ownerId = * -1, ownerType = where ownerId = and ownerType = and bidId = update tbl_BID_Bids set ownerId = * -1, ownerType = where ownerId = and ownerType = and bidId =
MERGED!