Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> TO_NUMBER Problem
I am running the following code on an 8.1.6 database, and the join on
two numeric fields (cal_year) only works with either a to_number or
to_char function.
However, when I run the same code against a clone of the database at 8.1.7, it works fine without the to_number/to_char function. Was there a bug that was resolved from 8.1.6 to 8.1.7, or is my code faulty?
SELECT E.EMPL_NUMBER,E.COMP_NUMBER,E.CAL_YEAR,W.CAL_YEAR
FROM ANNUAL_DATA E ,COMP_NUMBER W
WHERE E.EMPL_NUMBER = 'W998X492'
AND E.CAL_YEAR = 2001
AND W.COMP_NUMBER = E.COMP_NUMBER
AND TO_NUMBER(W.CAL_YEAR) = TO_NUMBER(E.CAL_YEAR)
Thanks for any insights.
-- Posted via Mailgate.ORG Server - http://www.Mailgate.ORGReceived on Tue Feb 19 2002 - 16:33:51 CST
![]() |
![]() |