Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

THREE CONDITIONS ON 10 INPUTS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
pravinmaliye

New User


Joined: 28 Aug 2006
Posts: 9
Location: pune

PostPosted: Thu Nov 22, 2007 9:32 pm    Post subject: THREE CONDITIONS ON 10 INPUTS
Reply with quote

HI

i have a coloumn dname i n a table

which contains a,b,c----------------

i want to write a query such as

select dname from table
where dname = a,b,c,d,e,f,g

and dname not in(m,n,a,h)

and disp=i

now dname and disp conditions should be applied for only

a,b,c,d,e,f not for all dname rows in table

so plz tell me how can i write a query
Back to top
View user's profile Send private message

stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Nov 22, 2007 9:57 pm    Post subject:
Reply with quote

First off your query is wrong, you have A in "dname not in" and A in the
"where dname = "

Code:

select dname from table
where dname not in(m,n,h)
and (dname in (a,b,c,d,e,f,g) and disp = i)
for read only with UR
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
This topic is locked: you cannot edit posts or make replies. Providing inputs to a panel of anothe... Raghur CLIST & REXX 2 Tue Apr 05, 2016 12:01 pm
No new posts DFSORT report with multiple conditions Bill Woodger DFSORT/ICETOOL 9 Wed Jan 20, 2016 2:19 am
No new posts Need Inputs: for generic program(s) rocky_balboa COBOL Programming 2 Tue Feb 04, 2014 1:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us