|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sql select help?
hi friends!
I need to select records from the table with as follows name date a 06/12/2004 b 07/12/2004 c 06/12/2004 45 09/12/2004 the should be o6/12/2004 2 07/12/2004 1 08/12/2004 0 09/12/2004 9 i need which can show above by month. i.e if i give month as june it must show records as above for all the days of that month please do help regards |
|
#2
|
||||
|
||||
|
Just use the COUNT() function.
Example: This statement also depends on the database you are using. This also depends on whether you are passing the word "June" or just 6 (for June) Code:
SELECT DateField, Count(*) As Count
FROM TableName
WHERE DatePart("M", DateField) = " & MonthSelected
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > sql select help? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|