Your question is too vague on "already exists". What if you are looking for an employee "John Smith" and coincidentally you are a large organization where there are SEVERAL "John Smith" names employed... Do you have other criteria? Such as a social security number, date of birth info, etc? If so, you could run a query something like.
lookForSSN = "123-45-6789"
use in select( "C_IsOnFile" )
select SomeIDColumn ;
from YourEmployeeTable ;
where SocSecNum = lookForSSN;
into cursor C_IsOnFile
if reccount( "C_IsOnFile" ) = 1
*/ Already on file, you can update it
update YourEmployeeTable;
set FirstName = FirstNameVar,;
LastName = LastNameVar,;
DoB = DoBVar,;
etc = etcVar;
where ;
SSN = lookForSSN
else
*/ Not on file, add it
insert into YourEmployeeTable ;
( FirstName, LastName, DoB, SSN, etc );
values;
( FirstNameVar, LastNameVar, DoBVar, lookForSSN, etcVar )
endif
*/ close temp cursor when finished
use in select( "C_IsOnFile" )