2 Replies Latest reply: Feb 3, 2013 3:02 AM by O.Developer RSS

    How to compare character/digits

      I have retrieved the last two character(it may be numbers or alphabets) of a string, using substr function. I want to compare the retrieved characters. Please help me how to do the same.

        • 1. Re: How to compare character/digits
          Suppose you have a value which you want to compare is string or number, take that value in varchar2 variable. Then get your retrieved string into VARCHAR2 variable then simply compare it.

          It will through no error because both are now string.

          Hope you understand.
          • 2. Re: How to compare character/digits
            Since both are varchar2 columns,

            SImply try beow..

            Let us think that u have two field -Filed1 and Filed2 - both are varchar2 type, then to compare, do below

            If Upper(Filed1) = Upper(Filed2) Then

            ----- Equal -Message

            --else Message
            End If