下面是我已经尝试过的代码,但没有成功:
INSERT INTO att_oem_orders SELECT NULL, ost.om_or_po, (SELECT j.job_id FROM jobsWHERE j.project_number = project_no), NULL, (SELECT ao.id FROM att_oem WHERE ao.item_no = item_no), ost.po_number, (SELECT ol.id FROM order_lsc WHERE STATUS = ol.line_status_code), <
我用来获取子关系的SQL是: FROM tbl_organisationsettree ost
JOINtbl_organisationsettree AS child_ost ON child_ost.leftedge BETWEEN ost.leftedge AND ost.rightedgeAND child_ost.super
" in directory /opt/ost/modules/conop/pymod
linked by target "_ost_gfx" in directory /opt/ost/modulestarget "_ost_img_alg" in directory /opt/ost/modules/img/alg&