Si le min entre une liste de colonnes marche pas,
essaie un truc du genre :
delete NomTable2 where indice in (
select V1.indice
from (
select T1_1.indice, T1_1.x1 as mini
from NomTable1 T1_1
where T1_1.x1 < T1_1.x2 and T1_1.x1 <T1_1.x3
union
select T1_2.indice, T1_2.x2 as mini
from NomTable1 T1_2
where T1_2.x2 < T1_2.x1 and T1_2.x2 <T1_2.x3
union
select T1_3.indice, T1_3.x3 as mini
from NomTable1 T1_3
where T1_3.x3 < T1_3.x1 and T1_3.x3 <T1_3.x2
) V1 inner join
(
select T2_1.indice, T2_1.x1 as mini
from NomTable2 T2_1
where T2_1.x1 < T2_1.x2 and T2_1.x1 <T2_1.x3
union
select T2_2.indice, T2_2.x2 as mini
from NomTable2 T2_2
where T2_2.x2 < T2_2.x1 and T2_2.x2 <T2_2.x3
union
select T2_3.indice, T2_3.x3 as mini
from NomTable2 T2_3
where T2_3.x3 < T2_3.x1 and T2_3.x3 <T2_3.x2
) V2 on V1.indice=V2.indice
where V1.mini < V2.mini
);
Message édité par poulpeleach le 07-01-2014 à 14:45:39