By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

Reporting by Week Commencing

P: n/a
Hi,

I have a database that lists customer orders. There is a field within
this customer order table that shows DeliveryDate - these could be
dates any day during the working week.

I need to be able to develop a report that Sums the total QTY ordered
by Week Commencing - how would i go about doing this?

Presumably i need somehow to calculate when the week commencing is in
my report - can this be done with the existing data that i have???

Regards,

Andy

Oct 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I think maybe you can do like this:
select * from your_table where weekday(date())=6 and
DeliveryDate<=date() and DeliveyDate>dateadd('d',-5,date()) order by
QTY;
Then in every Friday,you can get a report of this week.

Patonar 写道:
Hi,

I have a database that lists customer orders. There is a field within
this customer order table that shows DeliveryDate - these could be
dates any day during the working week.

I need to be able to develop a report that Sums the total QTY ordered
by Week Commencing - how would i go about doing this?

Presumably i need somehow to calculate when the week commencing is in
my report - can this be done with the existing data that i have???

Regards,

Andy
Oct 26 '06 #2

P: n/a
There is also a function called datepart

datepart("ww",nameofdatefield) will give you the weeknumber for the
supplied date.

get the weeknumber of any supplied date and then you can see if any
record has a delivery date with that same week number.

Ron

Oct 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.