Advertisement

10.21.2007 at 02:06PM PDT, ID: 22907804
[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!

6.0

Help with Yet Another Another Complex Query

Asked by dbbishop in MS SQL Server

We get data from daily files that are bulk inserted into SQL Server and then parse into tables. One set of data represents 'accepted' billing data. The other represents 'rejected' billing data. There are various detail records for an account. Think of it like a phone compnay, and any time someone makes a long-distance call, a detail billing record is created. A person can make no calls on a day or 15, thus there will be a corresponding number of daily detail records.

Since acceptance is based on an all-or-nothing basis, if there is something wrong with the data that the billing system verifies data against, if it is going to reject one of those items, it will reject all of them for an account. Part of the process of importing this data is to create a 'summary' entry into a reject research table. If an account had any detail data rejected (regardless of how many), I create an entry into the reject research table, with the account number and the date of recect.

The following condition applies: If the account had data reject within the previous 7-days, I do not add a new row or update anything in the research table; the premise being, if it rejected within the past 7-days, it is under research and the reason for the error will be corrected, so we can just assume anything rejected within that time-frame is already under research and the resolution will be tied to the more recent rejected data and accepted.

The problem: We have realized that some accounts have not been reported as rejected. I have identified all accounts that NEVER made it into the reject research table, but now I need to identify the following scenario:

An account rejected on date (n). It rejected again on date (n + (8 + m) days), where m >= 0, but there is no record of that account in the reject research table.

So, if an account rejected on 9/1, and again on 9/7, I would expect to see the account with a date of 9/1 in the research table, but not the 9/7 date. However, I would expect to see it if there was a reject on 9/10.

Given the following scenario:
acct    reject date
1234   8/10/2007
1234   8/11/2007
1234   8/12/2007
1234   8/19/2007
1234   8/22/2007
1234   9/10/2007
1234   9/20/2007
1234   9/24/2007
1234   9/28/2007

I would expect to find 8/10/2007, 8/19/2007, 9/10/2007, 9/20/2007 and 9/28/2007 in the research table. I need to produce a query that would report to me if, for example, 8/19/2007 was not located in the research table.

The comparision would be between ALL the detail data wihich contains all the individual detail records for the account, and the research table, which contains an account and the date it had rejects.

Account is a BIGINT datatype, and the reject date is DATETIME.Start Free Trial
 
Loading Advertisement...
 
[+][-]10.21.2007 at 08:12PM PDT, ID: 20120564

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 08:16PM PDT, ID: 20120576

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 08:20PM PDT, ID: 20120592

View this solution now by starting your 30-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: MS SQL Server
Sign Up Now!
Solution Provided By: alphaau
Participating Experts: 2
Solution Grade: B
 
 
[+][-]10.21.2007 at 08:23PM PDT, ID: 20120609

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 12:29PM PDT, ID: 20126067

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 12:47PM PDT, ID: 20126241

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:00PM PDT, ID: 20126352

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:12PM PDT, ID: 20126445

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:25PM PDT, ID: 20126542

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:26PM PDT, ID: 20126554

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:38PM PDT, ID: 20126645

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:42PM PDT, ID: 20126691

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 01:48PM PDT, ID: 20126734

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 02:08PM PDT, ID: 20126935

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2007 at 11:34AM PDT, ID: 20133275

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_EXPERT_20070906