PC Review
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
Re: counting db results?
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
Re: counting db results?
![]() |
Re: counting db results? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
As I do not know anything about your database, I cannot answer this with any
certainty, but it is likely you have a year value, as well: SELECT COUNT(Month) FROM Reports WHERE Month LIKE '::Month::' AND Year LIKE '::Year::' -- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA Author: ADO.NET and XML: ASP.NET on the Edge **************************************************************************** **** Think Outside the Box! **************************************************************************** **** "matt shudy" <matt.shudy@pechiney.com> wrote in message news:019d01c34718$f101cc80$a501280a@phx.gbl... > Hi, > > I'm using this code right now > > SELECT COUNT(Month) FROM Reports > WHERE Month > LIKE '::Month::' > > It works fine for the month part but I also want to count > based on year. So if the user choose July and all years, > it works fine. But if the user choose July and 2002 the > count will be the same as the all years count. Is there a > way to add years into this query? > > Thanks, > > Matt |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

