You are on page 1of 7

SERIAL.

NO TASK TYPE

1 TO_DATE (FUN)

insert into ()values()


2
TASK DESCRIPTION

To change the date format for the selected date

while inserting values to table


SQL QUERY WITH ERROR
Select To_Date(Sysdate,'dd/mon/yyyy') From Dual;

insert into department (dept_id,dept_name,manager_id) values(05,'interior_design',1105);


ERROR FACED

ORA-01843: not a valid month

SQL Error: ORA-02291: integrity constraint (ARAVIND.SYS_C004054) violated - parent key not found 02291. 00000 - "integrity

.
SQL WITH ERROR CLEARED

Select To_Date(Sysdate,'dd/mm/yyyy') From Dual;

parent key not found 02291. 00000 - "integrity constraint (%s.%s) violated - parent key not found" *Ca
ERROR OCCURRED DATE ERROR CLEARED DATE SOLUTION

2/23/2022 16:45 It takes2/23/2022


only the number
17:01 format of the date. So, no character format can be used in to_date function

3/13/2022 15:09
STATUS REASON/COMMENTS

Finished I gave character format for month in the query

You might also like