Having Problems with CAST Function
583143Dec 20 2007 — edited Dec 20 2007Hey Guys;
I need to write an SQL statement that does a cast or some type of conversion from a number to a string.
I have tried a number of things and can't get it to work.
Here's what i currently have:
SELECT *
FROM TABLE1
WHERE COLUMN1 = CAST(12345678 AS STRING)
I've tried using CHAR and VARCHAR2 instead of string and it still doesn't work. When i use VARCHAR2 it says i'm missing a left parenthesis and when i use CHAR it says data value out of range. That doesn't make sense to me, because if i put the same value in quotes, it runs fine.
Hope someone can help me out.
thanks in advance