Skip to main content
WolfShade
Legend
April 18, 2014
Answered

Invalid number (01722) in Oracle 10g

  • April 18, 2014
  • 1 reply
  • 662 views

Hello, everyone,

I have an Oracle 10g database, and in it is a table where the first column is a VARCHAR 36 and contains Oracle generated UIDs.

I am trying to run a SELECT query that gets a corresponding (date 19)  where the UID = '{ a 36 character long UID}'.  I am getting the  ORA-01722 invalid number error message.

SELECT s.ENTERED_DATE

FROM dsp.status s

WHERE s.UID = '4a29d12025012995c231f18eb7704009'

I've tried using TO_CHAR() and CAST() to no avail.  What am I missing?

V/r,

^_^

    This topic has been closed for replies.
    Correct answer BKBK

    Isn't UID a word that Oracle reserves for a pseudo-column representing an integer?

    1 reply

    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    April 18, 2014

    Isn't UID a word that Oracle reserves for a pseudo-column representing an integer?

    WolfShade
    WolfShadeAuthor
    Legend
    April 18, 2014

      If I'd been 6 minutes quicker..

    I just discovered that putting UID in double-quotes will allow the query to run without issue.

    SELECT s.ENTERED_DATE

    FROM dsp.status s

    WHERE s."UID" = '4a29d12025012995c231f18eb7704009'

    Sigh.. you'd think that a database as old and robust as Oracle would be able to be a bit more specific with the error messages.

    Thanks, @BKBK.

    ^_^