Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i have the following type of data
acctcode | acctname | PL Acc | levels | Level 5 | Level 4 | Level 3 | Level 2 | Level 1 |
100000000000000 | Asset | BS | 1 | 100000000000000 | 100000000000000 | 100000000000000 | 100000000000000 | 100000000000000 |
110000000 | FIXED ASSETS | BS | 2 | 100000000000000 | 100000000000000 | 100000000000000 | 100000000000000 | 100000000000000 |
111000000 | FIXED ASSETS | BS | 3 | 110000000 | 100000000000000 | 100000000000000 | 100000000000000 | 100000000000000 |
111010000 | FIXED ASSETS | BS | 4 | 111000000 | 110000000 | 100000000000000 | 100000000000000 | 100000000000000 |
111100000 | LAND | BS | 5 | 111010000 | 111000000 | 110000000 | 100000000000000 | 100000000000000 |
111100001 | FREE HOLD LAND | BS | 6 | 111100000 | 111010000 | 111000000 | 110000000 | 100000000000000 |
111100002 | LEASE HOLD LAND | BS | 6 | 111100000 | 111010000 | 111000000 | 110000000 | 100000000000000 |
111200000 | BUILDING | BS | 5 | 111010000 | 111000000 | 110000000 | 100000000000000 | 100000000000000 |
111200001 | BUILDING | BS | 6 | 111200000 | 111010000 | 111000000 | 110000000 | 100000000000000 |
with the acctcode and acctname, i have to extract the name(respective acctname) for Level 1 field, and other 4 levels fields
please help me to get the desired result.
it is do in the script and get names for all level fields.
Thanks in advance,
Kalyan
hi all,
everybody who refer this discussion....
i have solved it by myself using applymap...
Seg_Map:
Mapping Load Acctcode,
AcctName
From ......
Segment:
Load AcctCode,
ApplyMap('SegMap',[Level 1],'N/A') as L1Name,
ApplyMap('SegMap',[Level 2],'N/A') as L2Name,
ApplyMap('SegMap',[Level 3],'N/A') as L3Name,
ApplyMap('SegMap',[Level 4],'N/A') as L4Name,
ApplyMap('SegMap',[Level 5],'N/A') as L5Name
From............
I have extracted names from the AcctName to the respective Levels successfully..
Thanks,
Kalyan.D
Hi,
It's not clear from the picture above if the acctcode and acctname are join together.
However, best bet will be to use Subfield()
Example:-
subfield(S, ';' ,2) | returns 'cde' if S is 'abc;cde;efg' |
subfield(S, ';' ,1) | returns NULL if S is an empty string |
Try Subfield and let us know if it workd.
Regards,
Gabriel
hi gabriel..
acctcode is seperate...numbers(integer)
acctname is character...
are you able to see the levels(1-5)?
level1 is integer...
but i need level1name by using the acctname...
example:
Load
AcctCode,
AcctName as L1Name
From xxxx
where Level 1 = AcctCode;
whehther this script will be correct or not?
but i cant get exact names by using this scripting
please help
hi all,
everybody who refer this discussion....
i have solved it by myself using applymap...
Seg_Map:
Mapping Load Acctcode,
AcctName
From ......
Segment:
Load AcctCode,
ApplyMap('SegMap',[Level 1],'N/A') as L1Name,
ApplyMap('SegMap',[Level 2],'N/A') as L2Name,
ApplyMap('SegMap',[Level 3],'N/A') as L3Name,
ApplyMap('SegMap',[Level 4],'N/A') as L4Name,
ApplyMap('SegMap',[Level 5],'N/A') as L5Name
From............
I have extracted names from the AcctName to the respective Levels successfully..
Thanks,
Kalyan.D