${if(org_shortname = ''," SELECT business_m as 数值 FROM table_A WHERE index_code = 'CB005' AND org_code = (SELECT distinct org_shortname FROM table_A WHERE org_code = 'GL001' AND STATS_MTH = '"+month+"' ORDER BY org_shortname limit 1) AND stats_mth = '"+ month +"' "," SELECT business_m as 数值 FROM table_A WHERE index_code = 'CB005' AND org_shortname = '"+ org_shortname +"' AND stats_mth = '"+ month +"' ")} 请大神帮看下上面这个sql,当参数org_shortname为空时,一直执行不出来,不知道是不是条件中的子查询格式有问题。 |