I have a query that will pull a member's line of business desc from their current eligibility sequence. In most cases the members have only 1 current sequence, however we have a subset of the population that will have 2 current sequences. In this case when the member is chosen, if they have 2 sequences
For example here is my query.
SELECT LOB_DESC,MPG_UID
FROM MPG_MEM_PLAN_GROUP,
OPP_ORG_PAYER_PLAN,
LOB_LINE_OF_BUSINESS
WHERE MPG_OPP_ID = OPP_ID
AND OPP_LOB_CODE = LOB_CODE
AND MPG_MEM_UID = 1046133
This query will return 2 rows
LOB Desc MPG UID
Medi-cal 4589195
Medicare 4584694
I need to pull the LOB DESC showing Medicare, and if a member with 1 sequence is chosen then show whatever the current LOB DESC is. I am using Oracle 10g.
How can I limit my query to just 1 row no matter what member is chosen?
For example here is my query.
SELECT LOB_DESC,MPG_UID
FROM MPG_MEM_PLAN_GROUP,
OPP_ORG_PAYER_PLAN,
LOB_LINE_OF_BUSINESS
WHERE MPG_OPP_ID = OPP_ID
AND OPP_LOB_CODE = LOB_CODE
AND MPG_MEM_UID = 1046133
This query will return 2 rows
LOB Desc MPG UID
Medi-cal 4589195
Medicare 4584694
I need to pull the LOB DESC showing Medicare, and if a member with 1 sequence is chosen then show whatever the current LOB DESC is. I am using Oracle 10g.
How can I limit my query to just 1 row no matter what member is chosen?