Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to DB2

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi

I am new to DB2 and need your help

Please help with the SQL statement to select all records that have PROD in the body of the Description field

In Access I would write this:

SELECT * FROM TABLE1 WHERE DESCRIPTION LIKE '*PROD*'

But that does not seem to work in DB2

Please help
 
You just need a different wildcard character, the % (per cent sign)

Select *
From Table1
where description like '%PROD%'

This stuff would be too easy if all DBMS's used the same symbols.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top