Fórum Oi pessoal! deu branco hó. Preciso apagar todos os registro? #178209
28/08/2003
0
tb_escritorio e tb_material
Eu quero fazer uma rotina que apague todos os registro da tb_material que está vinculado a tb_escritorio. eu não me lembro
tb_material.prior;
while to tb_escritorio do
begin
tb_material.delete;
tb_material.next;
end;
Preciso desta dica ´URGENTE´.
Machado
Curtir tópico
+ 0Posts
28/08/2003
Luciano Pimenta®
DELETE FROM tb_material
WHERE cod_material in (SELECT cod_material FROM tb_escritorio)
Gostei + 0
28/08/2003
Machado
Meu banco de dados é paradox e prefiro não entrar muito neste negocio de sql que eu uso apenas para gerar relatórios. não tem outro exemplo?
Gostei + 0
28/08/2003
Machado
Table1.Delete;
prontinho!! hehehe
Gostei + 0
28/08/2003
Bacalhau
table1.first;
while not table1eof do
begin
if <material pertence ao escritório>
then table1.delete
else table1.next;
end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)