I have 3 tables in Microsoft SQL Server. 2 tables “Claims” and “Claims_Details” are populated when we ingest claims from our EDI software.
Claims
Claims_Details
Once those two tables are populated, we want to populate the third table which is “Claims_Transmittal”.
I use insert into query to update fields from “claims” and “claims_details” table. I manage to populate the table. However, the problem is claim details has these columns that are “procedure_code” and “procedure_cost” and are in new row for each claim Id. For example, claim id 1 will have 1+ procedure code and each will have unique cost associated with it. These are important to calculate total cost. For each batch there could be 1+ claims and each claims will have 1+ procedure code and procedure cost. I would like to update the claims transmittal where the claim number will have all these procedure code and procedure cost for each claim. Something Like this:
How do I do it? I can’t even think about where to begin?
INSERT To Claim_Transmittals
FROM Claims_Details
I wanted to update