---
title: 'DB2 Datafix to remove dodgy characters'
url: 'https://jeepmonkey.com/blog/removing-dodgy-characters-from-db2'
markdown: 'https://jeepmonkey.com/blog/removing-dodgy-characters-from-db2.md'
date: '2015-05-07'
description: "A quick and dirty db2 datafix to remove some dodgy characters that was causing our application to fail. Of course we also corrected the application to stop inserting these characters in the first place. DB2 9.7.5 UPDATE devt.LOG set message = replace(message,TRIM(TRANSLATE(message, ' ', '(){}!;%$#…"
taxonomy:
  category:
    - Computer
    - Tech
  tag:
    - 9.7.5
    - datafix
    - db2
    - sql
---

# DB2 Datafix to remove dodgy characters

## [DB2 Datafix to remove dodgy characters](https://jeepmonkey.com/blog/removing-dodgy-characters-from-db2)

    7th May 2015   [9.7.5](https://jeepmonkey.com/tag:9.7.5#body-wrapper) [datafix](https://jeepmonkey.com/tag:datafix#body-wrapper) [db2](https://jeepmonkey.com/tag:db2#body-wrapper) [sql](https://jeepmonkey.com/tag:sql#body-wrapper)  

A quick and dirty db2 datafix to remove some dodgy characters that was causing our application to fail. Of course we also corrected the application to stop inserting these characters in the first place.

## [DB2 9.7.5](http://www-01.ibm.com/support/docview.wss?uid=swg27015148)

```
UPDATE devt.LOG 
set message = replace(message,TRIM(TRANSLATE(message, ' ', '(){}!;%$#*?@+&_^=-":/''.,0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')),'') 
where length(TRIM(TRANSLATE(message, ' ', '(){}!;%$#*?@+&_^=-":/''.,0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ))) > 0
```

 [ Previous Post](https://jeepmonkey.com/blog/irrigation-caddy-issue) [Next Post ](https://jeepmonkey.com/blog/rails-codename-generator)

#### Popular Tags

---

## Navigation

- Parent: [Blog](https://jeepmonkey.com/index.md)
- Previous: [Rails Codename Generator App](https://jeepmonkey.com/blog/rails-codename-generator.md)
- Next: [Irrigation Caddy Issue](https://jeepmonkey.com/blog/irrigation-caddy-issue.md)
