可以啊
如下:
ls_sql += " insert blb00000 SELECT b.name,'c',"+ls_sql1+" as quantity,0,0,0,0,'"+is_month+"','"+is_reportid+"' from babh0000 r,bach0000 a,aaa00000 b "
ls_sql += " where r.warehousecode = a.warehousecode and r.vouchertype = a.vouchertype and "
ls_sql += " r.vouchernumber = a.vouchernumber and r.checkoutmonth = a.checkoutmonth and "
ls_sql += " a.itemcode = b.code and a.checkoutmonth ="+ is_month+" and "
ls_sql += " ( a.warehousecode = '0153' ) GROUP BY b.name ORDER BY b.name ASC "