Solved

Assistance finding members with no claims

Posted on 2013-05-15
4
201 Views
Last Modified: 2013-05-15
Hi Experts,

My thanks in advance for your assistance...

Code-wise, I am having a hard time with my SQL trying to figure out who has never had a claim for a certain time period yet is a member during the same time period.

It is easy for those with any claims between start_dt and end_dt but to state having a count of zero or NULL claims I realize is not logical.

The basic tables I am working with are MEMBERS and MASTER_CLAIM and maybe need to pull in a membership view vmembership.

I can provide some basic column names and data -- at this point I need more help jump-starting how to tackle the process!
0
Comment
Question by:britpopfan74
4 Comments
 
LVL 7

Expert Comment

by:Ross Turner
ID: 39168424
I can provide some basic column names and data -- at this point I need more help jump-starting how to tackle the process!

This will help to get our teeth stuck into your problem.....
0
 
LVL 6

Accepted Solution

by:
BurundiLapp earned 300 total points
ID: 39168428
You could select all the members where membership was valid during the given period and perhaps use a not in statement to exclude them from the list of members that have had a claim in that period

e.g:
Select memberID, memberName, etc
from members
where membership_start_dt >= '20120101' and membership_end_dt < '20130101'
and memberID NOT IN (Select memberID from MasterClaim where where start_dt >= '20120101' and end_dt < '20130101')
0
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 200 total points
ID: 39168485
Just create a SQL statement that returns the member ID's where membership was valid and then put an surrounding select where you return all records where the member ID is not in the inner select statement.
0
 

Author Closing Comment

by:britpopfan74
ID: 39168602
Thank you very much for your help!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now