帆软数据集预览报错

图片.png

这个脚本在数据库是可以执行的,在帆软上加了参数,就报这个错

sql:

${"WITH x1 as " +if(transflag='1', "(Select  Comcode   From D_COMPANY_NEW d   Where Comcode2='"+comcode+"')"   ,"(select distinct d.COMCODE2 as comcodefrom SUM_LCLAIMPAID_CAR ainner join D_COMPANY_NEW  d ON a.COMCODE=d.COMCODEwhere comcode2='"+comcode+"')")+"select case when syxz||clzldw= '非营业个人非过户客车' then 1 when syxz||clzldw= '非营业个人过户客车' then 2 when syxz||clzldw= '非营业个人摩托车' then 3 when syxz||clzldw= '非营业个人非营业个人' then 4 when syxz||clzldw= '非营业自卸[0,2)吨' then 5 when syxz||clzldw= '非营业自卸[2,5)吨' then 6 when syxz||clzldw= '非营业自卸[5,10)吨' then 7 when syxz||clzldw= '非营业自卸10吨以上' then 8 when syxz||clzldw= '非营业自卸非营业自卸' then 9 when syxz||clzldw= '非营业货车[0,1)吨' then 10 when syxz||clzldw= '非营业货车[1,2)吨' then 11 when syxz||clzldw= '非营业货车[2,5)吨' then 12 when syxz||clzldw= '非营业货车[5,10)吨' then 13 when syxz||clzldw= '非营业货车10吨以上' then 14 when syxz||clzldw= '非营业货车非营业货车' then 15       when syxz||clzldw= '非营业货运非营业货运' then 16 when syxz||clzldw= '非营业企业非营业企业' then 17 when syxz||clzldw= '非营业机关非营业机关' then 18 when syxz||clzldw= '营业出租租赁营业出租租赁' then 19 when syxz||clzldw= '营业城市公交营业城市公交' then 20 when syxz||clzldw= '营业公路客运营业公路客运' then 21 when syxz||clzldw= '营业自卸[0,2)吨' then 22 when syxz||clzldw= '营业自卸[2,5)吨' then 23 when syxz||clzldw= '营业自卸[5,10)吨' then 24 when syxz||clzldw= '营业自卸10吨以上' then 25 when syxz||clzldw= '营业自卸营业自卸' then 26 when syxz||clzldw= '营业货车[0,1)吨' then 27 when syxz||clzldw= '营业货车[1,2)吨' then 28 when syxz||clzldw= '营业货车[2,5)吨' then 29 when syxz||clzldw= '营业货车[5,10)吨' then 30 when syxz||clzldw= '营业货车10吨以上' then 31 when syxz||clzldw= '营业货车营业货车' then 32 when syxz||clzldw= '营业货运营业货运' then 33 when syxz||clzldw= '特种车一特种车一' then 34 when syxz||clzldw= '特种车二特种车二' then 35 when syxz||clzldw= '特种车三特种车三' then 36 when syxz||clzldw= '特种车四特种车四' then 37 when syxz||clzldw= '特种车特种车' then 38 when syxz||clzldw= '总计总计' then 39 end as 排序_syxz,case when RISKCODE='商车' then 1 when RISKCODE='交强' then 2 else 3 end as 排序_RISKCODE,comcode2||'-'||comname2 as comcode2," +if(type_flag='1'," a.comcode3||'-'||a.comname3 as comcode3 ,","")+"comcode3,comname3, syxz, clzldw,RISKCODE,ROUND(SUM (SUMNOTAXPREMIUM_Y)/10000,2) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT,substr(    round(        CASE        WHEN SUM (SUMNOTAXPREMIUM_Y) = 0 THEN            0        ELSE            SUM (FEETYPE) / SUM (SUMNOTAXPREMIUM_Y)        END,        4    ) * 100 || '%',    0,    instr (        round(            CASE            WHEN SUM (SUMNOTAXPREMIUM_Y) = 0 THEN                0            ELSE                SUM (FEETYPE) / SUM (SUMNOTAXPREMIUM_Y)            END,            4        ) * 100 || '%',        '.'    ) + 3) || '%' AS 变动销售费用率, substr(    ROUND(        CASE        WHEN (SUM(EARNEDPREMIUM_TAX)) = 0 THEN            0        ELSE            (                SUM (SUMPAID) + (SUM (SUMNOPAID_end)-sum(SUMNOPAID_start))            ) / (SUM(EARNEDPREMIUM_TAX))        END,        4    ) * 100 || '%',    0,    instr (        ROUND(            CASE            WHEN (SUM(EARNEDPREMIUM_TAX)) = 0 THEN                0            ELSE                (                    SUM (SUMPAID) + (SUM (SUMNOPAID_end)-sum(SUMNOPAID_start))                ) / (SUM(EARNEDPREMIUM_TAX))            END,            4        ) * 100 || '%',        '.'    ) + 3) || '%' AS 满期赔付率,case when (sum(sumPAIDcount)+sum(noPAIDcount_end)-sum(noPAIDcount_START))=0 then 0 else(SUM (SUMPAID)+(SUM (SUMNOPAID_end)-sum(SUMNOPAID_start)))/(sum(sumPAIDcount)+sum(noPAIDcount_end)-sum(noPAIDcount_START))  end as 案均赔款,  substr(ROUND(case when (SUM (POLICYCOUNT)*SUM (EARNEDPREMIUM_TAX)=0 or SUM (SUMNOTAXPREMIUM_Y)=0) then 0 else (sum(CLAIMCOUNT)-sum(CANCELCOUNT))/(SUM (POLICYCOUNT)*    SUM (EARNEDPREMIUM_TAX)/SUM (SUMNOTAXPREMIUM_Y)) end ,4)*100 || '%',    0,instr (    ROUND(case when (SUM (POLICYCOUNT)*SUM (EARNEDPREMIUM_TAX)=0 or SUM (SUMNOTAXPREMIUM_Y)=0) then 0 else (sum(CLAIMCOUNT)-sum(CANCELCOUNT))/(SUM (POLICYCOUNT)*    SUM (EARNEDPREMIUM_TAX)/SUM (SUMNOTAXPREMIUM_Y)) end ,4)*100 || '%','.') +3 ) || '%' as 出险频度 from (select statdate,RISKCODE,comcode2,comname2,comcode3,comname3,     syxz, clzldw,SUM (SUMNOTAXPREMIUM_Y) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT, SUM (EARNEDPREMIUM_TAX) as EARNEDPREMIUM_TAX, SUM (sumpaid) as sumpaid, SUM (SUMNOPAID_end) as SUMNOPAID_end,  SUM (SUMNOPAID_start) as SUMNOPAID_start, SUM (FEETYPE) as FEETYPE, sum(sumPAIDcount) as sumPAIDcount, sum(noPAIDcount_end) as noPAIDcount_end, sum(noPAIDcount_START) as noPAIDcount_START, sum(CLAIMCOUNT) as CLAIMCOUNT,  sum(CANCELCOUNT) as CANCELCOUNTfrom sum_zgtsb_gdlnz_2022GROUP BY statdate,RISKCODE,comcode3,comname3 ,comcode2,comname2,      syxz, clzldwunion all select statdate,'车险' as riskcode, comcode2,comname2,comcode3,     comname3,      syxz, clzldw,SUM (SUMNOTAXPREMIUM_Y) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT, SUM (EARNEDPREMIUM_TAX) as EARNEDPREMIUM_TAX, SUM (sumpaid) as sumpaid,  SUM (SUMNOPAID_end) as SUMNOPAID_end,  SUM (SUMNOPAID_start) as SUMNOPAID_start, SUM (FEETYPE) as FEETYPE, sum(sumPAIDcount) as sumPAIDcount, sum(noPAIDcount_end) as sumPAIDcount, sum(noPAIDcount_START) as noPAIDcount_START, sum(CLAIMCOUNT) as CLAIMCOUNT,  sum(CANCELCOUNT) as CANCELCOUNTfrom sum_zgtsb_gdlnz_2022GROUP BY  statdate,comcode2,comname2,comcode3,comname3, syxz, clzldw) awhere statdate = '202307'and comcode2='2120000000'group by comcode2||'-'||comname2 , syxz, clzldw,RISKCODE,case when syxz||clzldw= '非营业个人非过户客车' then 1 when syxz||clzldw= '非营业个人过户客车' then 2 when syxz||clzldw= '非营业个人摩托车' then 3 when syxz||clzldw= '非营业个人非营业个人' then 4 when syxz||clzldw= '非营业自卸[0,2)吨' then 5 when syxz||clzldw= '非营业自卸[2,5)吨' then 6 when syxz||clzldw= '非营业自卸[5,10)吨' then 7 when syxz||clzldw= '非营业自卸10吨以上' then 8 when syxz||clzldw= '非营业自卸非营业自卸' then 9 when syxz||clzldw= '非营业货车[0,1)吨' then 10 when syxz||clzldw= '非营业货车[1,2)吨' then 11 when syxz||clzldw= '非营业货车[2,5)吨' then 12 when syxz||clzldw= '非营业货车[5,10)吨' then 13 when syxz||clzldw= '非营业货车10吨以上' then 14 when syxz||clzldw= '非营业货车非营业货车' then 15 when syxz||clzldw= '非营业货运非营业货运' then 16 when syxz||clzldw= '非营业企业非营业企业' then 17 when syxz||clzldw= '非营业机关非营业机关' then 18 when syxz||clzldw= '营业出租租赁营业出租租赁' then 19 when syxz||clzldw= '营业城市公交营业城市公交' then 20 when syxz||clzldw= '营业公路客运营业公路客运' then 21 when syxz||clzldw= '营业自卸[0,2)吨' then 22 when syxz||clzldw= '营业自卸[2,5)吨' then 23 when syxz||clzldw= '营业自卸[5,10)吨' then 24 when syxz||clzldw= '营业自卸10吨以上' then 25 when syxz||clzldw= '营业自卸营业自卸' then 26 when syxz||clzldw= '营业货车[0,1)吨' then 27 when syxz||clzldw= '营业货车[1,2)吨' then 28 when syxz||clzldw= '营业货车[2,5)吨' then 29 when syxz||clzldw= '营业货车[5,10)吨' then 30 when syxz||clzldw= '营业货车10吨以上' then 31 when syxz||clzldw= '营业货车营业货车' then 32 when syxz||clzldw= '营业货运营业货运' then 33 when syxz||clzldw= '特种车一特种车一' then 34 when syxz||clzldw= '特种车二特种车二' then 35 when syxz||clzldw= '特种车三特种车三' then 36 when syxz||clzldw= '特种车四特种车四' then 37 when syxz||clzldw= '特种车特种车' then 38 when syxz||clzldw= '总计总计' then 39 end,case when RISKCODE='商车' then 1 when RISKCODE='交强' then 2 else 3 end "+if(type_flag='1'," ,a.comcode3||'-'||a.comname3 as comcode3 ","")+"order by 3,1,2 "}

FineReport 帆软用户BhIiRBrNYs 发布于 2023-8-9 15:06 (编辑于 2023-8-9 15:09)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共5回答
最佳回答
1
CD20160914Lv8专家互助
发布于2023-8-9 15:08

点击这里看生成的语句,把你完整的语句发出来。

image.png

  • 帆软用户BhIiRBrNYs 帆软用户BhIiRBrNYs(提问者) ${\"WITH x1 as \" +if(transflag=\'1\', \"(Select Comcode From D_COMPANY_NEW d Where Comcode2=\'\"+comcode+\"\')\" ,\"(select distinct d.COMCODE2 as comcode from SUM_LCLAIMPAID_CAR a inner join D_COMPANY_NEW d ON a.COMCODE=d.COMCODE where comcode2=\'\"+comcode+\"\' )\") +\" select case when syxz||clzldw= \'非营业个人非过户客车\' then 1 when syxz||clzldw= \'非营业个人过户客车\' then 2 when syxz||clzldw= \'非营业个人摩托车\' then 3 when syxz||clzldw= \'非营业个人非营业个人\' then 4 when syxz||clzldw= \'非营业自卸[0,2)吨\' then 5 when syxz||clzldw= \'非营业自卸[2,5)吨\' then 6 when syxz||clzldw= \'非营业自卸[5,10)吨\' then 7 when syxz||clzldw= \'非营业自卸10吨以上\' then 8 when syxz||clzldw= \'非营业自卸非营业自卸\' then 9 when syxz||clzldw= \'非营业货车[0,1)吨\' then 10 when syxz||clzldw= \'非营业货车[1,2)吨\' then 11 when syxz||clzldw= \'非营业货车[2,5)吨\' then 12 when syxz||clzldw= \'非营业货车[5,10)吨\' then 13 when syxz||clzldw= \'非营业货车10吨以上\' then 14 when syxz||clzldw= \'非营业货车非营业货车\' then 15 when syxz||clzldw= \'非营业货运非营业货运\' then 16 when syxz||clzldw= \'非营业企业非营业企业\' then 17 when syxz||clzldw= \'非营业机关非营业机关\' then 18 when syxz||clzldw= \'营业出租租赁营业出租租赁\' then 19 when syxz||clzldw= \'营业城市公交营业城市公交\' then 20 when syxz||clzldw= \'营业公路客运营业公路客运\' then 21 when syxz||clzldw= \'营业自卸[0,2)吨\' then 22 when syxz||clzldw= \'营业自卸[2,5)吨\' then 23 when syxz||clzldw= \'营业自卸[5,10)吨\' then 24 when syxz||clzldw= \'营业自卸10吨以上\' then 25 when syxz||clzldw= \'营业自卸营业自卸\' then 26 when syxz||clzldw= \'营业货车[0,1)吨\' then 27 when syxz||clzldw= \'营业货车[1,2)吨\' then 28 when syxz||clzldw= \'营业货车[2,5)吨\' then 29 when syxz||clzldw= \'营业货车[5,10)吨\' then 30 when syxz||clzldw= \'营业货车10吨以上\' then 31 when syxz||clzldw= \'营业货车营业货车\' then 32 when syxz||clzldw= \'营业货运营业货运\' then 33 when syxz||clzldw= \'特种车一特种车一\' then 34 when syxz||clzldw= \'特种车二特种车二\' then 35 when syxz||clzldw= \'特种车三特种车三\' then 36 when syxz||clzldw= \'特种车四特种车四\' then 37 when syxz||clzldw= \'特种车特种车\' then 38 when syxz||clzldw= \'总计总计\' then 39 end as 排序_syxz, case when RISKCODE=\'商车\' then 1 when RISKCODE=\'交强\' then 2 else 3 end as 排序_RISKCODE, comcode2||\'-\'||comname2 as comcode2,\" +if(type_flag=\'1\',\" a.comcode3||\'-\'||a.comname3 as comcode3 ,\",\"\") +\"comcode3,comname3, syxz, clzldw,RISKCODE,ROUND(SUM (SUMNOTAXPREMIUM_Y)/10000,2) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT, substr( round( CASE WHEN SUM (SUMNOTAXPREMIUM_Y) = 0 THEN 0 ELSE SUM (FEETYPE) / SUM (SUMNOTAXPREMIUM_Y) END, 4 ) * 100 || \'%\', 0, instr ( round( CASE WHEN SUM (SUMNOTAXPREMIUM_Y) = 0 THEN 0 ELSE SUM (FEETYPE) / SUM (SUMNOTAXPREMIUM_Y) END, 4 ) * 100 || \'%\', \'.\' ) + 3 ) || \'%\' AS 变动销售费用率, substr( ROUND( CASE WHEN (SUM(EARNEDPREMIUM_TAX)) = 0 THEN 0 ELSE ( SUM (SUMPAID) + (SUM (SUMNOPAID_end)-sum(SUMNOPAID_start)) ) / (SUM(EARNEDPREMIUM_TAX)) END, 4 ) * 100 || \'%\', 0, instr ( ROUND( CASE WHEN (SUM(EARNEDPREMIUM_TAX)) = 0 THEN 0 ELSE ( SUM (SUMPAID) + (SUM (SUMNOPAID_end)-sum(SUMNOPAID_start)) ) / (SUM(EARNEDPREMIUM_TAX)) END, 4 ) * 100 || \'%\', \'.\' ) + 3 ) || \'%\' AS 满期赔付率, case when (sum(sumPAIDcount)+sum(noPAIDcount_end)-sum(noPAIDcount_START))=0 then 0 else (SUM (SUMPAID)+(SUM (SUMNOPAID_end)-sum(SUMNOPAID_start)))/(sum(sumPAIDcount)+sum(noPAIDcount_end)-sum(noPAIDcount_START)) end as 案均赔款, substr( ROUND( case when (SUM (POLICYCOUNT)*SUM (EARNEDPREMIUM_TAX)=0 or SUM (SUMNOTAXPREMIUM_Y)=0) then 0 else (sum(CLAIMCOUNT)-sum(CANCELCOUNT))/(SUM (POLICYCOUNT)* SUM (EARNEDPREMIUM_TAX)/SUM (SUMNOTAXPREMIUM_Y)) end ,4)*100 || \'%\', 0, instr ( ROUND( case when (SUM (POLICYCOUNT)*SUM (EARNEDPREMIUM_TAX)=0 or SUM (SUMNOTAXPREMIUM_Y)=0) then 0 else (sum(CLAIMCOUNT)-sum(CANCELCOUNT))/(SUM (POLICYCOUNT)* SUM (EARNEDPREMIUM_TAX)/SUM (SUMNOTAXPREMIUM_Y)) end ,4)*100 || \'%\',\'.\' ) +3 ) || \'%\' as 出险频度 from ( select statdate, RISKCODE,comcode2,comname2,comcode3, comname3, syxz, clzldw,SUM (SUMNOTAXPREMIUM_Y) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT, SUM (EARNEDPREMIUM_TAX) as EARNEDPREMIUM_TAX, SUM (sumpaid) as sumpaid, SUM (SUMNOPAID_end) as SUMNOPAID_end, SUM (SUMNOPAID_start) as SUMNOPAID_start, SUM (FEETYPE) as FEETYPE, sum(sumPAIDcount) as sumPAIDcount, sum(noPAIDcount_end) as noPAIDcount_end, sum(noPAIDcount_START) as noPAIDcount_START, sum(CLAIMCOUNT) as CLAIMCOUNT, sum(CANCELCOUNT) as CANCELCOUNT from sum_zgtsb_gdlnz_2022 GROUP BY statdate, RISKCODE,comcode3, comname3 ,comcode2,comname2, syxz, clzldw union all select statdate, \'车险\' as riskcode, comcode2,comname2, comcode3, comname3, syxz, clzldw,SUM (SUMNOTAXPREMIUM_Y) as SUMNOTAXPREMIUM_Y, SUM (POLICYCOUNT) as POLICYCOUNT, SUM (EARNEDPREMIUM_TAX) as EARNEDPREMIUM_TAX, SUM (sumpaid) as sumpaid, SUM (SUMNOPAID_end) as SUMNOPAID_end, SUM (SUMNOPAID_start) as SUMNOPAID_start, SUM (FEETYPE) as FEETYPE, sum(sumPAIDcount) as sumPAIDcount, sum(noPAIDcount_end) as sumPAIDcount, sum(noPAIDcount_START) as noPAIDcount_START, sum(CLAIMCOUNT) as CLAIMCOUNT, sum(CANCELCOUNT) as CANCELCOUNT from sum_zgtsb_gdlnz_2022 GROUP BY statdate,comcode2,comname2, comcode3, comname3, syxz, clzldw ) a where statdate = \'202307\' and comcode2=\'2120000000\' group by comcode2||\'-\'||comname2 , syxz, clzldw,RISKCODE, case when syxz||clzldw= \'非营业个人非过户客车\' then 1 when syxz||clzldw= \'非营业个人过户客车\' then 2 when syxz||clzldw= \'非营业个人摩托车\' then 3 when syxz||clzldw= \'非营业个人非营业个人\' then 4 when syxz||clzldw= \'非营业自卸[0,2)吨\' then 5 when syxz||clzldw= \'非营业自卸[2,5)吨\' then 6 when syxz||clzldw= \'非营业自卸[5,10)吨\' then 7 when syxz||clzldw= \'非营业自卸10吨以上\' then 8 when syxz||clzldw= \'非营业自卸非营业自卸\' then 9 when syxz||clzldw= \'非营业货车[0,1)吨\' then 10 when syxz||clzldw= \'非营业货车[1,2)吨\' then 11 when syxz||clzldw= \'非营业货车[2,5)吨\' then 12 when syxz||clzldw= \'非营业货车[5,10)吨\' then 13 when syxz||clzldw= \'非营业货车10吨以上\' then 14 when syxz||clzldw= \'非营业货车非营业货车\' then 15 when syxz||clzldw= \'非营业货运非营业货运\' then 16 when syxz||clzldw= \'非营业企业非营业企业\' then 17 when syxz||clzldw= \'非营业机关非营业机关\' then 18 when syxz||clzldw= \'营业出租租赁营业出租租赁\' then 19 when syxz||clzldw= \'营业城市公交营业城市公交\' then 20 when syxz||clzldw= \'营业公路客运营业公路客运\' then 21 when syxz||clzldw= \'营业自卸[0,2)吨\' then 22 when syxz||clzldw= \'营业自卸[2,5)吨\' then 23 when syxz||clzldw= \'营业自卸[5,10)吨\' then 24 when syxz||clzldw= \'营业自卸10吨以上\' then 25 when syxz||clzldw= \'营业自卸营业自卸\' then 26 when syxz||clzldw= \'营业货车[0,1)吨\' then 27 when syxz||clzldw= \'营业货车[1,2)吨\' then 28 when syxz||clzldw= \'营业货车[2,5)吨\' then 29 when syxz||clzldw= \'营业货车[5,10)吨\' then 30 when syxz||clzldw= \'营业货车10吨以上\' then 31 when syxz||clzldw= \'营业货车营业货车\' then 32 when syxz||clzldw= \'营业货运营业货运\' then 33 when syxz||clzldw= \'特种车一特种车一\' then 34 when syxz||clzldw= \'特种车二特种车二\' then 35 when syxz||clzldw= \'特种车三特种车三\' then 36 when syxz||clzldw= \'特种车四特种车四\' then 37 when syxz||clzldw= \'特种车特种车\' then 38 when syxz||clzldw= \'总计总计\' then 39 end,case when RISKCODE=\'商车\' then 1 when RISKCODE=\'交强\' then 2 else 3 end \" +if(type_flag=\'1\',\" ,a.comcode3||\'-\'||a.comname3 as comcode3 \",\"\") +\"order by 3,1,2 \" } 劳烦大佬看一下
    2023-08-09 15:09 
  • CD20160914 CD20160914 回复 帆软用户BhIiRBrNYs(提问者) 语句发到最上面,不要放在回复中,回复中论坛要加斜杠!
    2023-08-09 15:09 
  • 帆软用户BhIiRBrNYs 帆软用户BhIiRBrNYs(提问者) 回复 CD20160914 放到上面了
    2023-08-09 15:13 
  • CD20160914 CD20160914 回复 帆软用户BhIiRBrNYs(提问者) 。。。都没有引用x1的临时表,后面也没有from的语句,你这是要做什么?先看一下基础语法:https://blog.csdn.net/miachen520/article/details/125105730
    2023-08-09 15:14 
  • CD20160914 CD20160914 回复 帆软用户BhIiRBrNYs(提问者) 语句又没有换行,逻辑太多,你一点点减少字段测试看。。先把基础的测试通。
    2023-08-09 15:14 
最佳回答
1
Z4u3z1Lv6专家互助
发布于2023-8-9 15:07

贴全SQL

最佳回答
1
yzm180820Lv5初级互助
发布于2023-8-9 15:10(编辑于 2023-8-9 15:20)

${if(transflag="","sql语句",if(flag="","sql语句"))} 这样写

  • 帆软用户BhIiRBrNYs 帆软用户BhIiRBrNYs(提问者) if语句用完后,后边还有sql,我这样写对吗:${if(transflag=\"\",\"sql语句\",\"sql语句\") +\"sql语句\"} 我上边按这个格式写,检查了好几遍看不出问题,就是报上边那个错
    2023-08-09 15:16 
  • yzm180820 yzm180820 回复 帆软用户BhIiRBrNYs(提问者) if里面还可以继续嵌套if的 ${if(transflag=\"\",\"sql语句\",if( flag=\'\',\"sql语句\"))}
    2023-08-09 15:18 
最佳回答
1
congerLv6高级互助
发布于2023-8-9 15:21

点旁边的预览sql,然后再复制到数据库,看看新的报错是什么,你就知道哪里拼接的不对了

image.png

最佳回答
1
旧友Lv5见习互助
发布于2023-8-9 15:24(编辑于 2023-8-9 15:25)

${if(transflag="","sql语句","sql语句")} 

这种写法里面不能再用${if(len(字段) == 0,""," 字段= '" + 字段+ "'")}类似的写法

  • 5关注人数
  • 234浏览人数
  • 最后回答于:2023-8-9 15:25
    请选择关闭问题的原因
    确定 取消
    返回顶部