oracle 版的人叫我来这,这的人又叫我去数据库版。:(

解决方案 »

  1.   

    sqlString  = select txn_dt as lastday,subj_id,debit_at,credit_at,curr_bal_at,last_mth_end_at,curr_yr_start_at from ssdtot where city_id='5850000' and txn_dt in ( select max(txn_dt) from ssdtot where substr(txn_dt,1,6)='200403') order by subj_id
    拆开,先select max(txn_dt) from ssdtot where substr(txn_dt,1,6)='200403'存起来
    再select txn_dt as lastday,subj_id,debit_at,credit_at,curr_bal_at,last_mth_end_at,curr_yr_start_at from ssdtot where city_id='5850000' and txn_dt in (xxx) order by subj_id