SQL query syntax with replace and concatenate
Posted on 2012-03-27
Looking for help with query that spools data to ASCII file from table (tab1) with several columns that have CR-s. If data doesn't have CR-s the following works:
select col1|| '|' ||
col2 || '|' ||
col3 || '|' ||
col4 || '|' ||
col5 || '|' ||
col6 from tab1 ;
However for two columns have to use
select replace (col3CHR(10),CHR(32))
select replace (col4CHR(10),CHR(32))
to replace CR with 'space'. - How to combine 'replace' functions and select-concatenate command?
Thank you Experts!