Hi,
I need to do an insert statement but it must first check if Employee ID and Code exists.
If it does exists it must return a message and if it does not exists the insert can continue.
Below is my statement.
Please assist:
IF EXISTS(SELECT * FROM tblMed WHERE Code = @Code AND EmployeeID = @EmployeeID )
INSERT INTO tblMedicalResult
(ID, Code, EmployeeID, CostCentre, DateTested )
VALUES
(@ID, @Code, @EmployeeID, @CostCentre, @DateTested )