sql - date format picture ends before converting entire input string error -
itemprop = "text">
I have this process:
after creating or modifying the function_back_here_selected_out_data (in date , Date out SYS_REFCURSOR) * from COURSE_LECTURE WHERE LECT_DATE_TIME_START & gt; = To_timestamp (in_date, 'dd-mm-yyyy') and LECT_DATE_TIME_START & lt; To_timestamp (in_date + 1, 'dd-mm-yyyy') ORDER BY LECT_DATE_TIME_START; End; Input: Date, Output: Lecture on this date. The date in the table (see) is TIMESTAMP.
I want to run this process. I tried to do this:
k SYS_REFCURSOR declared; --t Date: = to_date ('2010-12-14: 09: 56: 53', 'YYY-MM-DD: HH 24: MI: SS'); Res COURSE_LECTURE% rowtype; Return_rows_locure_vidadet (to begin ('2010-12-14', 'YYYY-MM-DD', K); Loop Fate Res in K; Exit K when not k%; DBMS_OUTPUT.PUT_LINE (res.COURSE_NAME); End loop; End; But I get this error:
Error Report - ORA-0130: Date format picture ending before converting full input string ORA-06512 Occurs: "hr.RETURN_ROWS_LECTURE_BY_DATE", line 4 ORA-06512: on line 6, 01830. 00000 - "Date format picture ends before converting the whole format string".
You are converting the date by using the TO_TIMESTAMP () in a timestamp, which one takes instead, instead you should use it, which changes a datatype to another; For example: WHERE LECT_DATE_TIME_START & gt; = CAST (IN_date as TIMESTAMP) You should do all your conversions from the date to the timestamp; . / html>
Comments
Post a Comment