Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Hi Experts,
This is very urgent!!!
I need to write a PL/SQL procedure to compare the data between the two tables. If I found the record mismatch then I need to write to the other table saying that "provider_id mismatch, that way I need to compare 4 (svc_prvd_nbr, cldr_bill_amt, cldr_schd_amt) columns. and also I need to compare the record count between the two tables as well. Please help!!!
--Victor
DECALRE
CURSOR cur01 IS
SELECT clm_nbr, svc_prvd_nbr, cldr_bill_amt, cldr_schd_amt, clmd_svc_beg,
clmd_svc_end, xxpos_cd, indv_hrn, bl_cpt_proc, xxbil_typ_cd
FROM qcare_report a;
CURSOR cur02 (pk hsd_profsvc_claim_header.claim_number%TYPE) IS
(SELECT a.claim_number,
d.provider_id,
b.billed_amt,
b.allowed_amt,
b.detail_svc_date,
b.svc_to_date,
b.place_of_service,
c.diamond_id member_id,
b.procedure_code
FROM hsd_profsvc_claim_header a, hsd_profsvc_claim_detail b,
hsd_member_master c, hsd_prov_master d
WHERE a.seq_claim_id = b.seq_claim_id
AND a.seq_memb_id = c.seq_memb_id
AND a.seq_prov_id = d.seq_prov_id
AND a.claim_number = pk) TEMP;
rec02 temp%ROWTYPE;
BEIGN
FOR rec01 IN cur01 LOOP
OPEN cur02(rec01.clm_nbr);
FETCH cur02 INTO rec02;
IF NOT ((rec01.clm_nbr=rec02.claim_number) or (rec01.svc_prvd_nbr=rec02.prcvider_id)) THEN
--insert into mismatch ...
INSERT INTO
END IF;
END LOOP;
EXCEPTION WHEN NO_DATA_FOUND THEN
NULL;
END;
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34:
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...
Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...
Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...
"The Oracle gurus provide answers, solutions and valuable workarounds"
User: schwertner
"Wow! Excellent, valuable explanation. Hats off to you"
User: aseshu70
"Solution worked fantastic and performs excellent! Thanks heaps"
User: klausbrandlhuber
slightwv
2,000
0 points yesterday
Profile
Posted on 2009-09-17 at 09:12:44ID: 28258466
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.