Advertisement

02.23.2007 at 08:54PM PST, ID: 22410624
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Query assistance

Asked by bingie in Microsoft Access Database

Here is a bit of data from my table. The field names are self explanitory, except the last field is the totalPrice for the whole booking.

bookingnum      firstdayout      itemnum      pretaxtotalprice
1323      01/06/2007      104      $34.50
1323      01/06/2007      149      $34.50
1323      01/06/2007      208      $34.50
1323      01/06/2007      25      $34.50
1323      01/06/2007      38      $34.50
1321      01/06/2007      133      $43.86
1322      01/06/2007      214      $51.80
1322      01/06/2007      252      $51.80
1322      01/06/2007      290      $51.80
1322      01/06/2007      0      $51.80
1322      01/06/2007      298      $51.80
1323      01/06/2007      219      $34.50
1184      01/10/2007      4      $145.00
1184      01/10/2007      41      $145.00
1184      01/10/2007      212      $145.00
1184      01/10/2007      218      $145.00
1184      01/10/2007      262      $145.00
1184      01/10/2007      235      $145.00
1184      01/10/2007      253      $145.00
1184      01/10/2007      50      $145.00
1325      01/10/2007      62      $52.62
1326      01/11/2007      208      $27.00
1326      01/11/2007      325      $27.00
1326      01/11/2007      150      $27.00

I have a query now that returns the one distinct booking (all i need for this query is the day out and the pretaxtotalprice).

From  "SELECT DISTINCT bookingnum, firstdayout, pretaxtotalprice, rentalstatus FROM tblbooking WHERE firstdayout between #1/1/2007# and date();"

bookingnum      firstdayout      pretaxtotalprice  rentalstatus
1321      01/06/2007      $43.86 0
1322      01/06/2007      $51.80 1
1323      01/06/2007      $34.50 2
1184      01/10/2007      $145.00 0
1325      01/10/2007      $52.62 0
1326      01/11/2007      $27.00 0

But, I want to get the totals for each day.

So i use

SELECT DISTINCT firstdayout, sum(pretaxtotalprice)
FROM [SELECT DISTINCT bookingnum, firstdayout, pretaxtotalprice FROM tblbooking WHERE firstdayout between #1/1/2007# and date()]
GROUP BY firstdayout;

And it seems to work correctly. Is this the right way to do this?

Also - how can I filter the results (with an If statement?) to seperate the values based on the rentalstatus value: RentalStatus=0 is confirmed, =1 is quote and =2 is deleted. So i would like to get the daily pretaxtotalprice for each type.Start Free Trial
 
Loading Advertisement...
 
[+][-]02.23.2007 at 09:14PM PST, ID: 18600984

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.23.2007 at 09:49PM PST, ID: 18601063

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2007 at 10:17PM PST, ID: 18601098

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 05:20PM PST, ID: 18603610

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 06:42PM PST, ID: 18603798

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 06:57PM PST, ID: 18603830

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 07:17PM PST, ID: 18603873

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 08:12PM PST, ID: 18604014

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 08:25PM PST, ID: 18604050

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Sign Up Now!
Solution Provided By: harfang
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32