PC Review Forums Newsgroups Microsoft Word Microsoft Frontpage Re: counting db results?

Reply

Re: counting db results?

 
Thread Tools Rate Thread
Old 10-07-2003, 08:45 PM   #1
Cowboy \(Gregory A. Beamer\)
Guest
 
Posts: n/a
Default Re: counting db results?


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



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off