Hello All
Im just about to start a new project and was woundering if any one had any
pointers on how I can group by weeks when selecting data
Each line of data consists of a part number and a due date for example.
I wish to select data and group by weeks 21 / July - 27 / July etc
So all parts with a due date between week start and week end dates would get
grouped up.
Question can you group on the TSQL statment by ISO weeks etc or will this have
to be done in the CFM code?
Not asking for a solution here im very willing to sit and think for myself,
just wondered on any pointers that might be around.
Kind Regards Guy
Hagster - 28 Jul 2008 15:19 GMT
Hello All,
Well that was easy to work out :). Can do it in the TSQL, code below just in
case any one was interested.
select month(planddate) AS plandate, planpart
, sum(planoq) AS planoq
from planned
group
by month(planddate), planpart
Kind Regards Guy
musicmp3 - 29 Jul 2008 06:42 GMT
Thanks Hagster.
For music visit http://mp3katalog.eu