Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to write query for this purpose
"MadhavC" <choudharymv_at_gmail.com> a écrit dans le message de news: 1166770724.491303.127960_at_79g2000cws.googlegroups.com...
| We have a worktran table
|
| WoNo Jobno Status
| 1 01 Fullfill
| 1 02 Pending
| 2 01 Fullfill
| 2 02 Fullfill
|
|
| We need to display those WoNo having all its rows status=fulfill
|
| In the example above, it should display only WoNo 2 because it contain
| all Fullfill status
| We tried - select distinct WoNo from worktran where status='Fullfill'
| But it does not make sure that all of the rows for certian WoNo have
| status='Fulfill'
|
| Thanks in advance.
|
Just use a group by on min function.
Regards
Michel Cadot
Received on Fri Dec 22 2006 - 01:06:16 CST