Skip to content

Instantly share code, notes, and snippets.

@inog
Created May 2, 2018 08:04
Show Gist options
  • Save inog/18b6551eecce60b23eb3c9d7ef758b2b to your computer and use it in GitHub Desktop.
Save inog/18b6551eecce60b23eb3c9d7ef758b2b to your computer and use it in GitHub Desktop.
find and replace linefeed character in DB2 Database
-- 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