Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLServer7 Group by date
Message
De
12/07/2001 11:34:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00529550
Message ID:
00529755
Vues:
9
>>anyone,
>>how do you write an SQL statement to be passed to sqlserver7 to group by date only without the time in datetime interfering in the process ?
>
>select < aggregate >, < aggregate > from MyTable group by Convert(Char(10),MyDatetimefield,101)
>
>You can use most any expression in the Group By clause with SQL Server and the field does not have to be in the field list (as it does in VFP).
>
>HTH.

That is if you're only returning aggregates in the select list. If you put any table field in the list you will need to put it on the group by too.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform