>>>>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
>>
>>Thank you very much!!! That was a very quick response!!!
>
>
Mine is quick ? Your reply came back before my "view" refreshed. I thought you replied before even I pressed "send" :) That's the fastest reply I've ever got :-)
>Cetin
See my other reply. When I try the DELETE FROM that you suggested I get an error message that the use of union in a subquery is not supported.