WorkingScripts

The Stuff that Just Works

WorkingScripts header image 2

DB2 Escape characters in queries

February 18th, 2009 by Iouri Chadour

Recently I had to use escape characters in DB2 queries and after looking through documentation here is a simple way to do this. You can define you escape character using

{escape '\'}

 

right after the statement your are trying to use it, here is a sample statement:

select oprid, oprdefndesc
from psoprdefn
where oprid like '%\_%' {escape '\'} 

Tags:   · No Comments

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Leave a Comment

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.