Home » SQL & PL/SQL » SQL & PL/SQL » not a vaild month error
not a vaild month error [message #37271] Mon, 28 January 2002 09:52 Go to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
I am trying to use the following insert statement but getting an error:"ORA-01843: not a valid month"

What is the problem , I have converted the sysdate using this before with out any errors?

Thank you in advance
Lance

insert into cp_license_use(Select A.Pc_session_id, a.pc_session_user_name, To_Char(SYSDATE,'MM/DD/YYYY HH:MI') From pt_client_event A where A.pc_event_op = 'LAUNCH' and A.pc_date >=SYSDATE -1
minus
Select B.Pc_session_id, b.pc_session_user_name, To_Char(SYSDATE,'MM/DD/YYYY HH:MI') From pt_client_event B where B.Pc_event_op = 'LOGOUT' and B.pc_date >=SYSDATE -1);
Re: not a vaild month error [message #37273 is a reply to message #37271] Mon, 28 January 2002 10:28 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
issue this command before insert stmt

SQL> alter session set nls_date_format='mm/dd/yyyy hh:mi';
Re: not a vaild month error [message #37275 is a reply to message #37271] Mon, 28 January 2002 10:43 Go to previous message
Lance Pris
Messages: 40
Registered: January 2002
Member
One question, Can I include this statement into a stored procedure?

Thanks
Lance
Previous Topic: How do I return recordset from Oracle
Next Topic: Re: column names on first line only
Goto Forum:
  


Current Time: Tue Jul 07 04:28:03 CDT 2020