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