Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have 2 tables
RTtype:
Rules,elements
1a ind,(id,lcc)
1b ind,(lcc,cc)
1c ind,(prgnm,cc)
RTentry:
Rules, id,lcc,cc,prgnm
1a ind, 1, a,11,abc
1b ind, 2, c,21,bbf
ic ind, 3, d,23,hhj
now i need to create a column 'key'in RTentry
like below
RTentry:
Rules, id,lcc,cc,prgnm, key(values of fields that are in element field of RTtype)
1a ind, 1, a,11,abc, 1,a
1b ind, 2, c,21,bbf, c,21
ic ind, 3, d,23,hhj, hhj,23
thanks in advance...!
Hi Bhagirath,
please check the Mapping of data from two tables in app development, that my original problem.
please suggest some solution
thanks .....
Hello!
I don't know how many records do you have in the table RTentry.
I've found decision, not perfect for big table but quite enough for small one.
If you have already loaded 2 tables, then you can use the following script:
Left Join (RTentry)
LOAD
Rules,
elements
Resident
RTtype;
for i=0 to NoOfRows('RTentry')-1
LET vRules=Peek('Rules',i,'RTentry');
LET vFormula=Peek('elements',i,'RTentry');
LET vFormula=PurgeChar(vFormula,'()' );
LET vFormula=Replace(vFormula,',','&'',''&');
t1:
LOAD
*,
$(vFormula) as key
Resident
RTentry
Where Rules='$(vRules)';
NEXT i;
DROP Table RTentry;
DROP Field elements from t1;
RENAME Table t1 to RTentry;