Hello guys, in a sql I am trying to convert a number format to string format.
create table test_cpy (name varchar2(20), age number(2), salary number(35));
insert into test_cpy values ('a',20,3746583);
select name||','||age||','||'="'+salary+'"' from test_cpy;
The reason for the number to text conversion is because the data in the table will be exported to another file in csv format and will be viewed in excel sheet and the numbers with large value will have an exponential value to it and I want to display the entire number as it is. The only to do that is to convert the number to text format.
To convert the number format to string format I used the following.
select name|| ',' || age || ',' || '="'+salary+'"' from test_cpy;
(the above sql is giving me an error ora-01722:invalid number)
I tried select name|| ',' || age || ',' || to_char(salary) from test_cpy;
but when I finally view the data in the excel, I am still getting the exponential values instead of the actual numbers
5.03479E+15
Can someone please help me how to proceed with this.
Thank You