Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

USING PEEK FIND THE OPENING AGAINEST CLAIMNO

Dear friends Please find the Attachment

and i want out put like below

where ever movement type -'NC' MY Opening amount is 0 other wise my closing amount as my opening amount for net record

out put

IACOD_CLM_NOMOVEMENTDATEMOVEMENT_TYPEclosingIACOD_CLM_MVMTCLAIM_LINKopening
VP0026434009/05/2011NC130001VP0026434010
VP0026434027/06/2011RC131442VP00264340213000
VP0026434027/06/2011PY76004VP00264340413144
VP0026434027/06/2011CC05VP0026434055544
2 Replies
miskinmaz
Creator III
Creator III

Hi,

Need to add following expression within the load statement of the table

if(MOVEMENT_TYPE<>'NC',Peek(closing),0) as opening_amt

Regards,

Miskin

swuehl
MVP
MVP

You can do it using something along these lines:

LOAD IACOD_CLM_NO,

    MOVEMENTDATE,

    MOVEMENT_TYPE,

    closing,

    IACOD_CLM_MVMT,

    CLAIM_LINK,

    If(Peek(IACOD_CLM_NO)=IACOD_CLM_NO and MOVEMENT_TYPE <> 'NC', Peek(closing), 0) as opening

FROM

[DATA (1).xls]

(biff, embedded labels, table is Sheet1$);

The input records need to be sorted by claim No and movement (this is already the case in your sample excel file), since your sample shows multiple records per movement date, you probably need another field to sort your data, maybe IACOD_CLM_MVMT.