[loadOriginal] select fnc_update_motocyo_sir(:s_id, ':syori_ymd_fr', ':syori_ymd_to', ':sir_cd', ':login_id') [load_grdList] select w.* , (case(w.motocyo_kind)when(0)then('繰越')when(1)then('集計')when(2)then('仕入')when(3)then('仕入')when(4)then('支払')when(5)then('支払')when(6)then('締め')end) as motocyo_kind_nm from w_sir_motocyo w where w.s_id = :s_id and w.sir_cd = ':sir_cd' order by s_id, sir_cd, syori_ymd, (case(motocyo_kind)when(5)then(4)when(3)then(2)else(motocyo_kind)end), motocyo_key1, motocyo_key2, motocyo_kind [getRange] select (case when(seikyu_ymd != '')then( to_char(to_date(seikyu_ymd,'YYYYMMDD') + interval '1 days','YYYYMMDD') )else('')end) as syori_ymd_fr , '' as syori_ymd_to from m_sir where sir_cd = ':sir_cd'