SELECT TOP 1 Category FROM #Temp GROUP BY Category
?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <charles@l...>
Subject: [sql_language] select from stored procedure
: I am trying to select certain fields from a stored procedure. I have a
table
: as the result of the stored procedure, with different categories. I would
: like to select the best from each category , ideally using asp rather than
: having to run a multitude of other queries of the query
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~