Oracle error message input value not long enough

后端 未结 1 463
天命终不由人
天命终不由人 2021-01-26 06:09

I need help with the below query. I am getting an error message :

ERROR: Error fetching from cursor. ORACLE err

1条回答
  •  我在风中等你
    2021-01-26 06:46

    • Probably you have a value like TO_DATE('0816', 'MMDDYYYY') for TR_EFF_DT input, and that does not fit with respect to the date format, as in the following statement :

      with tab(TR_EFF_DT) as
      (
       select TO_DATE('0816', 'MMDDYYYY') from dual   
      )
      select *
        from tab
       where TR_EFF_DT>= TO_DATE('08162011', 'MMDDYYYY');
      
      Error:
      ORA-01861: literal does not match format string
      
    • OR you probably have a mismatch for your DB server's Date Format with your current session's Date Format. In this case you may issue :

      ALTER SESSION SET nls_date_format='MMDDYYYY';
      

    0 讨论(0)
提交回复
热议问题