Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / July 2008



Tip: Looking for answers? Try searching our database.

grouping by date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hagster - 28 Jul 2008 15:08 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.