我在asp中用 ls_sql0 = "select distinct coreid,item,amt,inv_month,report_no,status,to_char(report_date,'YYYY-MM-DD') report_date,re1 from tep_reimburse" _
& " where report_no = '" & reportno &"' order by inv_month desc"数据可以正常显示,但是用order by to_date(inv_month,'MON-YYYY') desc 就不能显示, inv_month字段是varchar2型。如APR-2008。请帮忙。太感谢了!!!
& " where report_no = '" & reportno &"' order by inv_month desc"数据可以正常显示,但是用order by to_date(inv_month,'MON-YYYY') desc 就不能显示, inv_month字段是varchar2型。如APR-2008。请帮忙。太感谢了!!!
2 from dual;DD
-------------------
2008-04-01 00:00:00
SQL> select to_date('APR-2008','MON-YYYY') from dual;
select to_date('APR-2008','MON-YYYY') from dual
*
第 1 行出现错误:
ORA-01843: 无效的月份
-------------------
2008-04-01 00:00:00