Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: to_number question
Well now I'm not so sure about the previous post I did. Observe! (The reason for the subquery is that I have been screwing around with what was in it.)
select distinct nbr_cc_fop_name, X, Y
from (
select nbr_cc_fop_name, to_number(trim(nbr_cc_no_high)) X ,
to_number(trim(nbr_cc_no_low)) Y
from nbr_cc
where nbr_cc_fop_name in ('AX','MC','VI','DS')
)
NBR_CC X Y ------ ------------------- ------------------- AX 349999999999999 340000000000000 AX 379999999999999 370000000000000 DS 6011999999999999 6011000000000000 MC 5590999999999999 5000000000000000 MC 5999999999999999 5592000000000000 VI 4999999999999 4000000000000 VI 4999999999999999 4000000000000000
from (
select nbr_cc_fop_name, to_number(trim(nbr_cc_no_high)) X ,
to_number(trim(nbr_cc_no_low)) Y
from nbr_cc
where nbr_cc_fop_name in ('AX','MC','VI','DS')
)
where X - Y > 0 <<----- SCREWS IT UP
select nbr_cc_fop_name, to_number(trim(nbr_cc_no_high)) X , to_number(trim(nbr_cc_no_low)) Y
*ERROR at line 3:
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Jul 14 2004 - 20:14:31 CDT