Hi..
SE 12.1
I have a column varchar2(10). It has a mix of numbers and characters in it. I'm treating them as all characters.
For example, the column may have 02 or it might have A1 as a value in it.
So when I do a decode or Case on it, I'm surrounding the value with single speech marks. i.e.
select decode(unpaid_code,'02','1,0)
If I try this on a value '02', it doesn't retrieve the value. If I take the speech marks off, i.e.
select decode(unpaid_code,02,'1,0)
then it returns the correct value.
However, because the column contains text, certain queries return Invalid Number when I don't have speech marks on.
I've tried converting the column to text i.e.
select decode(to_char(unpaid_code),'2','1,0)
But this still doesn't return the right result..
Many Thanks