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

Home -> Community -> Usenet -> c.d.o.server -> Stranger

Stranger

From: Ethan Post <epost1NOepSPAM_at_yahoo.com.invalid>
Date: 2000/07/20
Message-ID: <04cd8e93.a5e992ce@usw-ex0105-037.remarq.com>#1/1

Even stranger..watch this...

  1. everything works fine

SQL> select to_char(sysdate, 'HH24:MI') from dual;

TO_CH



15:24

2. now run this

SQL> UPDATE METRIC_TIMES

  2      SET last_run = TRUNC(SYSDATE)
  3      WHERE met_id = 'def_dummy_softalert'
  4        AND TO_DATE('12:22', 'HH24:MI') <= TO_DATE

(SYSDATE, 'HH24:MI');

 UPDATE METRIC_TIMES
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

3. ok now rerun the first one

SQL> select to_char(sysdate, 'HH24:MI') from dual; select to_char(sysdate, 'HH24:MI') from dual

       *
ERROR at line 1:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], []

4. Want to fix it, just run this

SQL> select to_char(sysdate, 'MON-DD-RR') from dual;

TO_CHAR(S



JUL-20-00 5. see, it's not causing error anymore

SQL> select to_char(sysdate, 'HH24:MI') from dual;

TO_CH



15:26

6. and the corrected sql statement that causes this whole mess is

UPDATE METRIC_TIMES
   SET last_run = TRUNC(SYSDATE)
   WHERE met_id = 'def_dummy_softalert'
     AND TO_DATE('12:22', 'HH24:MI') <= TO_DATE(TO_CHAR
(sysdate, 'HH24:MI'), 'HH24:MI');


Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free!
http://www.keen.com Received on Thu Jul 20 2000 - 00:00:00 CDT

Original text of this message

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