read_loop: LOOP FETCH CUR1 INTO @patientId,@offerId,@touchpointId If @done THEN leave read_loop End select @tempCount=count(*) from patient_offers where patient_patientId=@patientId and @offerId=offers_offerId and touchpoint_touchpointId=@touchpointId IF(@tempCount=0) insert into patient_offers(patient_patientId,offers_offerId,touchpoint_touchpointId,allocatedOn,allocatedBy,status,icode) values(@patientId,@offerId,@touchpointId,convert(nvarchar(20),getdate(),120),1,'1',1252) END END LOOP
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)