473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Reporting by Week Commencing

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
2 1671
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: simplegood | last post by:
Got any recommendations for some software that can handle table as large as 800,000 records with joins to other tables to produce a time base report e.g. weekly slices of data. I guess you could...
2
by: David Olsen | last post by:
Would any of you kind souls now how to put into an unbound text box the week commencing date for the current week which you are in, so that the report heading would say something like for example,...
3
by: Paul Ritchie | last post by:
We are writing a web application for sale to clients to deploy on their own web server. Is there a good reference available comparing the various .NET compatible reporting packages? Cost of...
3
by: Patonar | last post by:
Hi, I have a query which works out which orders are due to be delivered in a particular week. I would like to display this by week commencing which i can do with the following WHERE condition in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.