Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Problem with TO_CHAR

Re: Problem with TO_CHAR

From: Chris Fahrner <cfahrner_at_OCTRF.ON.CA>
Date: Mon, 13 Mar 1995 09:08:23 EST
Message-Id: <9503131445.AA31972@alice.jcc.com>

          Hi (whom ever you are).

          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).
                                                       :-( caf

Received on Mon Mar 13 1995 - 09:45:54 CST

Original text of this message

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