|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sql statement date part help..
Can anyone tell me what is wrong with the Where statement in this. I know this date part function usuall works. Is it handled differently in sql server 2000?
SELECT Count(dbo_leaccp.agid) AS month_count, dbo_LEACCP.DIID FROM dbo_LEACCP group by dbo_leaccp.DIID WHERE (DatePart('yyyy', [dbo_leaccp.ACDATE]) = 2004) |
|
#2
|
|||
|
|||
|
Try
SELECT Count(dbo_leaccp.agid) AS month_count, dbo_LEACCP.DIID FROM dbo_LEACCP group by dbo_leaccp.DIID WHERE (DatePart(yyyy, [dbo_leaccp.ACDATE]) = 2004) S- |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > sql statement date part help.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|