Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Count NOT received by Week

Author  Topic 

olibara
Yak Posting Veteran

94 Posts

Posted - 2014-09-24 : 13:21:05
Hello
I have a problem that may sound trivial but it is not at all !

I have a table of articles with two dates
- CreationDate
- ReceptionDate

I have to produce a count by week for items to be received AS
Year Week Qty
2014 1 20
2014 2 25
2014 3 18
2014 5 21
etc

N.B. : I also have access to a calendar table

Thanks for any help

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-09-24 : 17:15:42
How do you define a week - is it Jan 1 to 7, or is it ISO Week, or something else? Does your calendar table have week numbers in it as a column?
Go to Top of Page

olibara
Yak Posting Veteran

94 Posts

Posted - 2014-09-25 : 04:00:13
Hello James,

The definition of the week is not realy the issue, and yes I have the week in my calendar
My issue is to count what was not receive for each weeks of the year
Go to Top of Page
   

- Advertisement -