databasedonr
Registered User.
- Local time
- Today, 10:15
- Joined
- Feb 13, 2003
- Messages
- 163
Thanks in advance for help with this query - I'm stumped.
I have a table of account numbers that has other columns, including "name" and "status". The status basically has two values - "subscriber" and "user" - basically, who is using the account and who pays for the account. Where the subscriber is the person using the account, I only have one record, but where the user and subscriber are unique, I have two records. What I need is a list of only users - returning the subscriber record if there is no user record, otherwise returning the user.
This seems simple but I'm not getting the results I want - essentially distinct values for each account number, but toggling between the user or subscriber depending on the value of status.
Any wizardry would be welcome. All data is in one table at them moment, which gives me duplicate values on the account number.
I have a table of account numbers that has other columns, including "name" and "status". The status basically has two values - "subscriber" and "user" - basically, who is using the account and who pays for the account. Where the subscriber is the person using the account, I only have one record, but where the user and subscriber are unique, I have two records. What I need is a list of only users - returning the subscriber record if there is no user record, otherwise returning the user.
This seems simple but I'm not getting the results I want - essentially distinct values for each account number, but toggling between the user or subscriber depending on the value of status.
Any wizardry would be welcome. All data is in one table at them moment, which gives me duplicate values on the account number.