Advertisement

10.05.2008 at 08:18PM PDT, ID: 23789422
[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.7

Complex Query in SQL Server 2000

Asked by dbbishop in SQL Query Syntax, MS SQL Server

I have a table that basically has a work order number, create date, close date and status. The table is loaded daily from an data we receive from an external source as part of an ETL process. Every time a work order is updated by the partner, it creates a new record. A work order initially has a status of 'O'. Subsequently, a work order can be either completed or canceled (status of 'C' or 'X') with close date set to the appropriate date.

The user has requested a report that bascially shows the number of pending orders by date. Thus, if on 1/1/2008 there are 100 orders, on 1/2/2008, there are 50 new orders, and 5 from 1/1/2008 are closed, on 1/3/2008 another 20 are created and 10 closed, the report would look like:

1/1/2008    100
1/2/2008    145
1/3/2008    155

and so on through the current date.

I can get a report that shows the number of pending orders created by date, but not sure how to then subtract from that count any workorders that have been closed up to that date.

The table will basically contain one or more records per workorder. If it is still pending, then all records will contain a status of 'O'. Once it is closed or cancelled there will be a subsequent row with the same workorder number but a status of 'C' or 'X'.

There are other columns involved in the calculations, but to keep it simple this will hopefully provide enough information.Start Free Trial
 
Keywords: Complex Query in SQL Server 2000
 
Loading Advertisement...
 
[+][-]10.05.2008 at 08:44PM PDT, ID: 22647096

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.

 
[+][-]10.06.2008 at 08:50AM PDT, ID: 22651330

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

Zones: SQL Query Syntax, MS SQL Server
Sign Up Now!
Solution Provided By: ScottPletcher
Participating Experts: 3
Solution Grade: A
 
 
[+][-]10.06.2008 at 05:46PM PDT, ID: 22655742

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.

 
[+][-]10.06.2008 at 07:47PM PDT, ID: 22656289

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.

 
[+][-]10.07.2008 at 12:34AM PDT, ID: 22657160

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.

 
[+][-]10.07.2008 at 07:00AM PDT, ID: 22659438

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.

 
[+][-]10.12.2008 at 06:17PM PDT, ID: 22699692

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.

 
[+][-]10.12.2008 at 10:50PM PDT, ID: 22700333

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.

 
[+][-]10.14.2008 at 03:00PM PDT, ID: 22716442

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.

 
[+][-]10.22.2008 at 06:21PM PDT, ID: 22782669

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.

 
[+][-]10.23.2008 at 07:18AM PDT, ID: 22786334

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.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906