SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict bronze trophy WolfShade's Avatar
    Join Date
    Mar 2014
    Location
    St. Louis, MO, USA
    Posts
    334
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Unique ID issue in Oracle 10g

    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.

    Code:
    SELECT SUBMIT_DATE
    
    FROM schema.tableA
    
    WHERE UID = '2c90c23129f120250129f18eb7740006'
    I've tried using TO_CHAR() and CAST() to no avail. What am I missing?

    V/r,

    ^_^

  2. #2
    SitePoint Addict bronze trophy WolfShade's Avatar
    Join Date
    Mar 2014
    Location
    St. Louis, MO, USA
    Posts
    334
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Smile Nevermind.. figured it out..

    UID is a reserved keyword in Oracle. If I put the column name in double-quotes, the query will run with no issues.

    Code:
    SELECT SUBMIT_DATE
    
    FROM schema.tableA
    
    WHERE "UID" = '2c90c23129f120250129f18eb7740006'
    (Is there a way to mark this as resolved??)

    V/r,

    ^_^


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •