SQL("ORACLE_BI_PRO", "WITH bom_com as (SELECT connect_by_root bom1.COLUMN3 as assembly_item_top, level lev,COLUMN1 from BI_PRO.ods_sdp_make_plan_bomygydsj_data_sheet1_all bom1 start with bom1.COLUMN3 in ('" + $p_code + "') connect by bom1.COLUMN3 = prior bom1.COLUMN10) --往下遍历的条件select max(lev) from bom_com where 1=1 AND assembly_item_top in ('" + $p_code + "') " + if(len(syb) = 0, "", "and COLUMN3 ('" + syb + "')"), 1) 这个COLUMN1要写成:${IF(len(syb)=0, "", "and 事业部 in ('"+syb+"')")}这种格式,要怎么改呢,我这个写法没有传进来这个参数,只有p_code生成了 |
最佳回答 |
||||
0
|
|