|
|
|
|
|
Re: How to display only details of group by query [message #441386 is a reply to message #441373] |
Sun, 31 January 2010 02:57  |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
You already display the details of EMP table, so your question seems to be inaccurate.
Let me guess. Problem is, that EXISTS clause does not filter any row. It happens because it always returns the resultset you showed regardless the displayed row from EMP table. So, either all rows are displayed or none (if the subquery in EXISTS clause would return no rows), nothing between. If you do not want this behaviour, correlate it with the main query. Using table aliases might be necessary. Or (properly) use IN clause instead. Examples of both approaches are available e.g. in this post on AskTom (just follow the link).
|
|
|