I am trying to do an OLE DB Command to add rows to my table only when the primary key field does not already exist within the same table. This is what I have so far:
insert into employee
(employee_id, first_name, middle_initial, last_name) /*fields of the employee table*/
values (employeedID, firstName, mInitial, lastName) /*columns from my input */
/* only insert into the table where employee_ID is not already in the table */
where ((select employee_id from employee where employee_id = employeeID) = NULL);
Basically all I want is a conditional insertion statement.
Thanks!