I'm trying to run separate SQL queries to do the following in SQL Server Studio 2005:
- Return rows where the M# has no value for the same person. In this example, it would be Test, David since all the others have one or more M#.
- Return rows the M# begins with the number 2. This would return Test, Frank and Test, Mary.
The biggest issue for me is getting the query to consider all the possible M# and D# scenarios and treat it as a single row (single person).
Please see attached for sample data.
Any help is greatly appreciated.
Thanks.
Kevin.
- Return rows where the M# has no value for the same person. In this example, it would be Test, David since all the others have one or more M#.
- Return rows the M# begins with the number 2. This would return Test, Frank and Test, Mary.
The biggest issue for me is getting the query to consider all the possible M# and D# scenarios and treat it as a single row (single person).
Please see attached for sample data.
Any help is greatly appreciated.
Thanks.
Kevin.