IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

DB2 Select Query Doubt

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DB2
View previous topic :: View next topic  
Author Message
sushanth bobby



Joined: 29 Jul 2008
Posts: 188
Location: INDIA

Posted: Wed Aug 20, 2008 11:41 am    Post subject: DB2 Select Query Doubt  

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  
Srihari Gonugunta



Joined: 14 Sep 2007
Posts: 184
Location: Pune

Posted: Wed Aug 20, 2008 12:34 pm    Post subject:  

Try the following way
Code: where case_pol_no like '%144289502%'  OR case_pol_no like '%155123302%'
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DB2
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM