Fórum While para retornar registros duplicados ! #582150
06/06/2017
0
Desde já agradeço pela ajuda !
Rodrigo Oliveira
Curtir tópico
+ 0Post mais votado
06/06/2017
Utilize a consulta.
select * from ( select cod_exame, id_exame, count(*) from SuaTabela Group by cod_exame, id_exame Having Count(*) > 1) as Src
Fabiano Carvalho
Gostei + 1
Mais Posts
06/06/2017
Robson Morais
select * from table where cod_exame = id_exame
creio que ficara mais rapido, agora se for percorrer a query;
while not query.eof do
begin
if query.fieldByName('cod_exame').asString = query.fieldByName('id_exame').asString then
showmessage('São iguais');
query.next;
end;
Gostei + 0
06/06/2017
Rodrigo Oliveira
Gostei + 0
06/06/2017
Raimundo Pereira
select
cod_exame,
id_exame,
count(*)
from SuaTabela
Group by cod_exame,
id_exame
Having Count(*) > 1) as Src
Realize um for com Update.
Gostei + 1
Clique aqui para fazer login e interagir na Comunidade :)