Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested Decode in Select Statement

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Working with Oracle 8i, I am trying to use the following nested decode from a where clause in the select statement to determine the claim's reason code. The following is from the where clause, can anyone assist me in telling me what I need to add or modify to use this in the select statement? Thanks

decode((select reason_code from hsd_hold_reason
where hsd_hold_reason.seq_claim_id = cv.hdr_seq_claim_id and rownum = 1),null,decode (cv.adjustment_reason,
null,
(decode(cv.not_covered_reason,
null,
(decode(cv.other_carrier_rsn,
null,
(decode(cv.allowed_reason,Null,cv.allowed_reason)),
cv.other_carrier_rsn)),
cv.not_covered_reason)),
cv.adjustment_reason),(select reason_code from hsd_hold_reason
where hsd_hold_reason.seq_claim_id = cv.hdr_seq_claim_id and rownum = 1)) = rcm1.reason_code(+)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top