I need to concatinate 28||'-'||column1 where column1 is number datatype. The value after contination should appear 28-60 where 60 is the value present in column1.
How do I do that? 28 is static value.
select '28-'||column1 into temp from table1;--it didn't work
select to_number('28-')||column1 into temp from table1;--this didn't work either.
Are you sure you don't want TO_CHAR('28')||'-'||column1?
Or even '28-'||column1. By adding the - you are making a char or a varchar2.
I tried doing that but it won't accept to_cahr function it says "too many declarations of to_char match this call"
I want to continate 28-||some number value.
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
How can I convert Varchar2 datatype to Number datatype.
I need to get a max value for a colun whose datatype is varchar but has numbers in it.
First - why would you possibly use a VARCHAR2 field to store numbers?
Regardless, simply do MAX(TO_NUMBER(field)). Of course, this will break if you have any non-numeric data in the field. There are other solutions on this forum to handle that, but I'm too lazy to look for them.
Click Here to Expand Forum to Full Width