IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Select Query Doubt


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Aug 20, 2008 11:41 am
Reply with quote

Hello Guyz,
I want to search for these string characters (144289502 , 155123302 , 155701510 , 174761410) from a table.
Right now iam writing 4 select queries for 4 numbers.

Eg : select * from inttest.inet_case where case_pol_no like '%144289502%'
For each of these policy numbers. And case_pol_no is CHAR data type

How can i write a query to check whether these policy numbers are in table or not in a single query. And also display them
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Aug 20, 2008 12:34 pm
Reply with quote

Try the following way
Code:
where case_pol_no like '%144289502%'  OR case_pol_no like '%155123302%'
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts SELECT from data change table DB2 5
Search our Forums:

Back to Top