In a SELECT statement I want to convert values to strings ie. SELECT TO_STRING(value).
How can I do this in Oracle SQL?
You can use either the TO_CHAR
or the CAST
function:
SELECT TO_CHAR(123.45) FROM DUAL
SELECT CAST(123.45 AS VARCHAR2(10)) FROM DUAL
SELECT CAST(column_name as data_type) from ...
might work
HTH
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