My table consists of a field that is binary_double. However I want to convert it to varchar.
The column currently has sample values stored as binary_double. It looks like this:
69623829
I want the result to be returned in the same format when I convert it to varchar. So expected output is like this:
69623829
I have tried this:
select
convert(varchar(20),r.col_14,1)
from sample_table r
The error message is:
ORA-00936: missing expression
p.s : I am just starting off in PL/SQL
I suggest using TO_CHAR function. See TO_CHAR.
As in
SELECT TO_CHAR(col14,'99999999') FROM sample_table
Please see linked documentation for the desired format according to your requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With