Reply to Re: Need help running query on data/time field

Your name:

Reply:


Posted by Techhead on 02/08/07 19:15

On Feb 8, 12:57 pm, "Techhead" <jorgenso...@gmail.com> wrote:
> On Feb 8, 12:41 pm, "Plamen Ratchev" <Pla...@SQLStudio.com> wrote:
>
> > You can return all records with today's date using a WHERE condition like
> > this:
>
> > WHERE mydate >= DATEDIFF(day, 0, getdate())
> > AND mydate < DATEDIFF(day, 0, getdate() + 1)
>
> > HTH,
>
> > Plamen Ratchevhttp://www.SQLStudio.com
>
> Awesome! Worked perfect!

Now how can I get a SUM of all records returned by this query. I know
SELECT SUM(*) AS TOTAL FROM does not work. What else can I try?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация