![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. |
#3
| |||
| |||
|
|
I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. |
#4
| |||
| |||
|
|
I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. |
#5
| |||
| |||
|
|
I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. |
#6
| |||
| |||
|
|
Arch wrote: I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. It would likely help if you used the full syntax: TO_DATE('07-DEC-1998', 'DD-MON-RRRR') or TO_DATE('07-DEC-1998', 'DD-MON-YYYY') |
#7
| |||
| |||
|
|
Arch wrote: I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. It would likely help if you used the full syntax: TO_DATE('07-DEC-1998', 'DD-MON-RRRR') or TO_DATE('07-DEC-1998', 'DD-MON-YYYY') |
#8
| |||
| |||
|
|
Arch wrote: I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. It would likely help if you used the full syntax: TO_DATE('07-DEC-1998', 'DD-MON-RRRR') or TO_DATE('07-DEC-1998', 'DD-MON-YYYY') |
#9
| |||
| |||
|
|
Arch wrote: I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. This used to work just fine - it doesn't any longer. The TO_DATE function now returns the error: ORA_1858 a non-numeric character was found where a numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. It does not return the desired value, of course, but no error. Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. It would likely help if you used the full syntax: TO_DATE('07-DEC-1998', 'DD-MON-RRRR') or TO_DATE('07-DEC-1998', 'DD-MON-YYYY') |
#10
| |||
| |||
|
|
On Wed, 20 Feb 2008 15:29:49 -0800, DA Morgan <damor... (AT) psoug (DOT) org wrote: Arch wrote: I need a hand with SQL. I'm using 9.2.0.4. I need to compute a date offset by a number of weeks from another date. *This is a line from a view that I had been using: TO_DATE('7-Dec-1998') + (WeekNum * 7) As WeekDate WeekNum is, of course, the field that contains the number of weeks to offset from the date. *This used to work just fine - it doesn't any longer. *The TO_DATE function now returns the error: * * *ORA_1858 a non-numeric character was found where a * * * * * numeric character was expected If I change it to TO_DATE('7-Dec-2000') or any later date, it no longer gives an error. *It does not return the desired value, of course, but no error. *Any date 1999 or earlier causes the error. I would appreciate any advice how to correct this. It would likely help if you used the full syntax: TO_DATE('07-DEC-1998', 'DD-MON-RRRR') or TO_DATE('07-DEC-1998', 'DD-MON-YYYY') Thank you.- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |