Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with ORDER BY
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00776296
Message ID:
00776301
Vues:
26
Michael,

What order would you consider correct?

>I have the following SPT statement, but it's in the wrong order. I can't seem to get the ORDER BY syntax correct:
>
>
>SELECT (cast(datepart(mm,time) as varchar)+'/'+datename(dd,time)+'/'+datename(yyyy,time)) AS DayField,
>COUNT(CondoDir) AS Hits FROM wwRequestLog
>WHERE UPPER(CondoDir) LIKE 'FRANKLIN'
>AND DATEDIFF(day, time, getdate()) < 14
>GROUP BY (cast(datepart(mm,time) as varchar)+'/'+datename(dd,time)+'/'+datename(yyyy,time))
>
>
>TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform