how can we wrap a text (coulmn value) basing ona stndard length of lets say 40 characters in to multi line in ORACLE SQL only.
select regexp_replace(column_name, '(.{40})', '\1' || chr(10) || chr(13))
from some_table;
In SQL Plus you can assign column widths
column column_name format a40
select column_name from table_name
The above format the output to be 40 columns wide and it would wrap anything to the next line.
Output display is usually controlled by the client
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