Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by
Message
De
12/01/2006 10:42:38
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
12/01/2006 10:13:11
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01086037
Message ID:
01086083
Vues:
24
>Sorry,
>
>SELECT dbo.t_role_map.*
>FROM dbo.t_role_map
>WHERE (uID IN
> (SELECT uID
> FROM dbo.t_role_map
> WHERE (rID = 100)
> GROUP BY uID, rID
> HAVING (COUNT(rID) > 1))) AND (rID = 100)
>
>I would like to Order By uID.
>
>>>The following select works without the 'order by' clause. When I put it in, it also adds 'top 100 percent' by default, and generates an error. I have tried saving the select without the 'order by' and calling it from another select (view), but that still generates the error. Is there an easy way to do this??
>>>
>>>Thanks in advance!
>>

I'd try it like this:
SELECT YourFieldList excluding rID, COUNT(rID) ;
  FROM dbo.t_role_map ;
 WHERE rID = 100 ;
 GROUP BY YourFieldList excluding rID ;
 ORDER BY uID ;
 HAVING COUNT(rID) > 1
Regards,
Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform