Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLServer7 Group by date
Message
 
 
To
11/07/2001 22:58:28
Edward See
Magicalogic Consultancy System
Quezon, Philippines
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00529550
Message ID:
00529555
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.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform