>>What is the best way to loop though a table and delete parent records if no child records exist?
>>
>>Thanks for any tips!!!
>>
>>Joe
>
>
Delete for !seek(PK,"ChildTable1","ChildFKTag") ;
> and !seek(PK,"ChildTable2","ChildFKTag") ;
> ....
>
>*or
>delete from parent ;
> where pk not in ;
> (select distinct ChildFK from child1 ;
> union select distinct ChildFK from child2)
Cetin
*or
delete from parent ;
where pk not in ;
(select ChildFK from child1) and ;
pk not in (select ChildFK from child2)