我在执行此sql
查询时遇到问题。变量combo_sel
似乎不会在sql
查询中被替换。
你能帮我找到错误吗?
String combo_sel = String.valueOf(station_type.getSelectedItem());
sql="Select reporting_date as REPORTING_DATE,for_date as FOR_DATE,outage_date as OUTAGE_DATE,outage_time as OUTAGE_TIME,stat_detail as STATION_DETAILS,res_date as RESTORATION_DATE,rest_time as RESTORATION_TIME,rest_reason as RESTORATION_REASON from " + table_sel+" where for_date='" + date1 + "' and stat_detail ="+ combo_sel ;