|
Home > Archive > MS SQL Data Warehousing > April 2005 > Using CASE and TOP statements - HELP
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using CASE and TOP statements - HELP
|
|
|
| Hi,
If i use Case in a query, is there a way to retrieve the top, lets say, 10
for each case within the same query, instead of making different select
statements for each case scenario?
Hence, if i have 3 Cases in the Query, i should have three Top 10's for each
Case?
Will appreciate any help,
Thanks,
Ali
| |
| Adam Machanic 2005-04-06, 8:01 pm |
| Can you post DDL, sample data, and the output you want based on the DDL and
sample data?
http://www.aspfaq.com/etiquette.asp?id=5006
--
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Ali" <aliasgerj@hotmail.com> wrote in message
news:%23uDNjdmOFHA.3144@tk2msftngp13.phx.gbl...
> Hi,
>
> If i use Case in a query, is there a way to retrieve the top, lets say, 10
> for each case within the same query, instead of making different select
> statements for each case scenario?
>
> Hence, if i have 3 Cases in the Query, i should have three Top 10's for
each
> Case?
>
> Will appreciate any help,
>
> Thanks,
>
> Ali
>
>
|
|
|
|
|