Created
May 2, 2018 08:04
-
-
Save inog/18b6551eecce60b23eb3c9d7ef758b2b to your computer and use it in GitHub Desktop.
find and replace linefeed character in DB2 Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- find all Line Feed Characters \u000A, chr(10), chr(13) | |
select * from verkauf.faserbc | |
where fbaun1=5620 | |
and | |
( instr(FBTEXT, chr(10)) > 0 | |
or | |
instr(FBTEXT, chr(13)) > 0 | |
) | |
; | |
-- and replace | |
update verkauf.faserbc SET | |
FBTEXT = replace(FBTEXT, chr(10),' ') | |
where fbaun1=5620 | |
and | |
( instr(FBTEXT, chr(10)) > 0 | |
or | |
instr(FBTEXT, chr(13)) > 0 | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment