Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am having one table contains Claim ID, Claim Type, PreandPost, and Main Claim ID in one table, I need to mapp PreandPost claims Claim Type as Main Claim ID Claim Type.
Data | ||||
claimid | Original ClaimType | PreandPost | mainclaimid | Need the Out put as |
838526 | MR | PreAndPost | - | PP |
838534 | MR | - | - | MR |
838536 | MR | - | - | MR |
838537 | MR | PreAndPost | 843848 | PP |
838541 | MR | - | - | MR |
843848 | PP | - | - | PP |
839111 | MR | - | - | MR |
839119 | MR | PreAndPost | 844425 | PP |
839232 | MR | - | - | MR |
839240 | MR | - | - | MR |
844425 | PP | - | - | PP |
LOAD
claimid,
OriginalClaimType,
PreandPost,
mainclaimid,
if( PreandPost = 'PreAndPost', 'PP', OriginalClaimType) as NewOutput
FROM ...;
Hi,
I would approach it the same way as swuehl.
Mark
Hi Rafee,
If you'd need to map this info into another table, then it would look like:
Map_claim:
MAPPING LOAD
claimid,
if( PreandPost = 'PreAndPost', 'PP', OriginalClaimType) as ...
FROM/RESIDENT .....
LOAD
*,
Applymap('Map_claim', claimid) as .....
FROM....
Kind regards,
Johan