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 -> TO_NUMBER Problem

TO_NUMBER Problem

From: Buck Turgidson <jc_va_at_hotmail.com>
Date: Tue, 19 Feb 2002 22:33:51 +0000 (UTC)
Message-ID: <330c88021a30f5fe987d183427e7f4aa.38849@mygate.mailgate.org>


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.ORG
Received on Tue Feb 19 2002 - 16:33:51 CST

Original text of this message

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