Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLServer7 Group by date
Message
From
12/07/2001 11:34:34
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00529550
Message ID:
00529755
Views:
7
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform