Gostaria de depurar uma tabela child onde ficaram registros sem o correspondente registro na tabela parent.
O que estou fazendo errado?
Select tableparent.campo1 from tableparent ;
left outer join child.campo1 = parent.campo1 ;
group by parent.campo1 ;
into cursor Qperdidos
Scan
perdido = qperdidos.campo1
Select child
Locate for child.campo1 = perdido
If found()
Delete
EndIF
select Qperdidos
EndScan
Obrigado pela atençao.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only