| 12345678910111213141516171819 |
- SELECT t1.sa_itemgroupmxid,
- t1.sequence,
- t2.*,
- t6.unitname,
- t3.erpitemname,
- t3.erpitemno,
- t3.material,
- t4.schemename
- FROM sa_itemgroupmx t1
- inner JOIN plm_item t2 ON t1.itemid = t2.itemid and ifnull(t2.isonsale, 0) = 1
- AND t1.siteid = t2.siteid
- LEFT JOIN plm_unit t6 ON t6.unitid = t2.unitid
- AND t6.siteid = t2.siteid
- left join plm_itemextend t3 on t2.siteid = t3.siteid and t2.itemid = t3.itemid
- left join sa_customscheme t4 on t2.sa_customschemeid=t4.sa_customschemeid and t2.siteid=t4.siteid
- where $where$
- and t1.sa_itemgroupid = $sa_itemgroupid$
- and t1.siteid = $siteid$
- order by t1.sequence asc
|