Copy link to clipboard
Copied
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,
^_^
Isn't UID a word that Oracle reserves for a pseudo-column representing an integer?
Copy link to clipboard
Copied
Isn't UID a word that Oracle reserves for a pseudo-column representing an integer?
Copy link to clipboard
Copied
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.
^_^