1 2 3 4 5 6 7 8 9 10
| select `b`.`art` AS `art`,
(select `a1`.`art_2` AS `art_2` from (`phase2_BOM2` `a1` join `QA` on((`a1`.`art_2` = `QA`.`art`))) where ((`b`.`art` = `a1`.`art`) and (`QA`.`groupe` in (100,101,110)))) AS `a1`,
(select `a2`.`art_2` AS `art_2` from (`phase2_BOM2` `a2` join `QA` on((`a2`.`art_2` = `QA`.`art`))) where ((`b`.`art` = `a2`.`art`) and (`QA`.`groupe` not in (100,101,110)))) AS `a2`,
`b`.`type` AS `tp`
from `phase2_BOM2` `b`
where (`b`.`type` = _latin1'K')
union
select test.`art` AS `art`,test.`art_2` AS `art_2`,NULL AS `NULL`,test.`type` AS `type`
from `phase2_BOM2` AS test
where (test.`type` = _latin1'I') |
Partager