Link to home
Start Free TrialLog in
Avatar of markej
markejFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Sql Join Problem

In the attached excel file I have the  some of the data from TWO tables Teammembers and Playerseasonlnk.

I need to join them so I can see those members who have paid for the current season as well as those who have yet to pay so I would want to add a parameter to allow me to select the current season

ie looking at the data :
Katie Joynes (id 22050) paid in seasonid = 5 BUT hasn't for seasonid = 6 so for seasonid = 6 I would want to see her in my join BUT with the seasonid as NULL
Cameron Shields (id 47079)  has paid for both seasons so will have an entry for both
Dave Smith (id 47121) only has an entry for season 6 so if I selected season 5 I would expect to see him BUT with a NULL for the seasonid

Finally moving forward when it comes to next year season 7 initially I would want to see all the members and the seasonid = NULL as no one will have paid.

I can get my query to show those who are null OR those who have paid BUT not both HELP.
Book1.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of markej

ASKER

Thanks for that, just got lost in the how to pass a parameter to a table that I wanted a NULL from.