Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Not a valid month error

RE: Not a valid month error

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Mon, 28 Jan 2002 16:21:47 -0800
Message-ID: <F001.003FDF6D.20020128151526@fatcity.com>

OK, my first guess was wrong. I can't think of any other idea. What if you do a describe cp_license_use
describe pt_client_event
and send the results to the list?
That might help some of my disused neurons to fire up. Are there any triggers on cp_license_use? Could it be that a trigger fired after an insert on cp_license_use is taking the input field in the format 'MM/DD/YYYY HH:MI' and trying to convert it into a date using a different format?

-----Original Message-----
From: Lance Prais [mailto:lprais_at_ts.checkpoint.com]

The field type is date for the pt_client_event.pc_date, I am confused thoroughly to why this will not work.  
-----Original Message-----
From: Jacques Kilchoer [mailto:Jacques.Kilchoer_at_quest.com]

> -----Original Message-----
> From: Lance Prais [mailto:lprais_at_ts.checkpoint.com]
>
> 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?
>
> 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);
Just a wild guess, but what is the datatype for field pt_client_event.pc_date ? If it has varchar2 for example, and Oracle has to do an implicit conversion to a date for the comparison to sysdate, then you might get error ORA-01843. Received on Mon Jan 28 2002 - 18:21:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US