Script to generate column list with rtrim function for char type columns for Oracle snapshot
creation, these columns will be converted to varchar2 on the snapshot site. Run from sqlplus
on the master site (where the snapshot logs are).
set head off pagesize 0
select case
when data_type = 'CHAR'
then 'rtrim (' || column_name || ') ' || column_name || ', '
when data_type <> 'CHAR'
then column_name || ', '
end
from dba_tab_columns
where table_name = 'TADADDRFAST'
and owner = 'ADO999'
order by column_id asc
/
|