Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Problem with TO_CHAR
I have 7.1.3 and ran a quick test to check out if the behaviour you mentioned was true. First it appears that there is no need for the TO_CHAR at all. ORACLE sees the difference in data type and does a valid comparison. (This appears to be via a TO_NUMBER on the VARCHAR2 rather than TO_CHAR on the NUMBER). Second, if the data for USER_ACCESS was as stated (though I wonder what datatype CARCHAR2 is) then it appears you have leading blanks in the USER_ACCESS field. Doing a TO_CHAR of say the number 2 results in '2' whereas your table seems to have ' 2' in it (though this could be a tab problem in my mail viewer). (Of course '2' and ' 2' are not equal in a CHARACTER compare but would be in a NUMERIC compare, sound familiar?). Hope this helps. Chris Fahrner cfahrner_at_octrf.on.ca Senior DBA - Ontario Cancer Foundation Pet Peeve: As a newbie on this list I noticed it replaces the from id with the list id so you cannot reply directly to the questioner, unless they include their address in the message body (I get my mail though cc-mail which strips everything but the from id). The policies of other lists I am on is, reply to the sender and they post a summary noting what did/did not work. Is it different here? (The list welcome message was not clear). :-( cafReceived on Mon Mar 13 1995 - 09:45:54 CST