Reply to Search Between Times

Your name:

Reply:


Posted by balaji.balaraman on 04/22/06 04:22

Hi I'm new to SQl..

I have some monthly data which is being encoded as Varchar...Say for
the month of January 2005 it wud look like '200501'. For each of my
month I have a coloums which gives me datetime and volume of the job.

This is what I'm doing

Select

Month,
Time ,
Sum(Volume)

>From Table A

Where (( Month like '200501%' ) and (Time between '2005-01-01
02:00:00.000' and '2005-01-31 06:00:00.000))

group by month, time

order by month

PRoblem: What I want is all the volume between 2am and 6am on every day
of the month?

The above query naturaly will give me everything between first and last
of the month...

Any help is appreciated...

Balaji

[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

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