Criteria based selection of a column value



IBM's flagship relational database management system

Criteria based selection of a column value

Postby saurabhgupta86 » Sun Jul 14, 2013 6:56 pm

Hi,

I have a table like below:

ID     SER      DESG
1      111       Manager
2      112      ASST MGR
3       221     CLERK
4       222      CLERK
5       223       ENGG
6       333       ENGG


I want to read all the records in the table, except DEGN column value [/b]but want to read DESG column value ONLY in case ID IS between 1 to 4 and SER IS between 112 to 222. Please suggest.

Regards,
Saurabh
saurabhgupta86
 
Posts: 13
Joined: Tue Aug 14, 2012 6:35 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Criteria based selection of a column value

 

Re: Criteria based selection of a column value

Postby dick scherrer » Mon Jul 15, 2013 1:05 am

Hello,

Suggest you learn to use the Code tag . . .

What is DEGN?

Suggest you Post the "output" you want when the query is run. What is posted is not clear.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post