Given a table Details:
| Lanugage | IsDefault | PropertyName |
|---|---|---|
| en | False | Property 119 |
| es | True | Property 119 |
| fr | False | Property 119 |
| en | False | Property 14 |
| es | True | Property 14 |
| en | False | Property 16 |
| es | True | Property 16 |
I am trying to SELECT * FROM Details WHERE [Language] = 'fr', then SELECT * FROM Details WHERE [Language] != 'fr' AND IsDefault = 1 without repeating PropertyName in the results if it was already selected in SELECT * FROM Details WHERE [Language] = 'fr'.
Expected Result is:
| Lanugage | IsDefault | PropertyName |
|---|---|---|
| fr | False | Property 119 |
| es | True | Property 14 |
| es | True | Property 16 |
However I have tried many things (UNION, NOT EXISTS ...) are the result for me is always:
| Lanugage | IsDefault | PropertyName |
|---|---|---|
| fr | False | Property 119 |
| es | True | Property 119 |
| es | True | Property 14 |
| es | True | Property 16 |
How would one achieve this?
