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]
|