Showing posts with label DB2. Show all posts
Showing posts with label DB2. Show all posts

Thursday, November 30, 2017

how to find special characters in database tables in db2

Have to use TRANSLATE funtion to find the special characters data in db2.


ex :

SELECT COL1,COL2
FROM TABLENAME WHERE LENGTH(TRIM(TRANSLATE(COL3,'`!@#$%^&*()_-+=|\}]{[":;?/<,>.',' '))) IS NULL


SELECT COL1,COL2,COL3,TRIM(TRANSLATE(COL3,'`!@#$%^&*()_-+=|\}]{[":;?/<,>.',' '))
FROM TABLENAME

Amazon.in


Don't Copy

Protected by Copyscape Online Plagiarism Checker

Pages

Offers