Tuesday, September 16, 2008

Remove Line Breaks from Data

If you have a column fornatted to hold the longest value, but data is still falling to a second line, it probably has a line break character in it. This is coded as 'CHR(10).' It can be replaced with a space to keep the value on one line as shown in the screen to the right.
Column Comments Format A80

Select Comments
From Dict
Where Table_Name = 'ALL_REFRESH_DEPENDENCIES';

Select Replace(Comments,Chr(10),' ')
As
Comments
From Dict
Where Table_Name = 'ALL_REFRESH_DEPENDENCIES';

2 comments: