Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
any body knows how to explain lookup with small example
dont copy from help doc , i have already seen it
i want how to write in script level can any one give small example with sample data
Hi Commonqlik
See the example by FlipSide here or below :
ProductTable:
Load * inline [
ProductID, ProductCategory, ComponentID
1, A, 123
2, B, 123
3, A, 333
4, C, 541
5, B, 221
];
ComponentTable:
Load * inline [
ComponentID,ComponentName
123, ABC
333, DEF
541, GHI
221, JKL
];
Data:
Load
Rowno() as ID,
Lookup('ComponentID','ProductID',rowno(),'ProductTable') as ID_output_lkp1,
Lookup('ComponentName','ComponentID',Lookup('ComponentID','ProductID',rowno(),'ProductTable'),'ComponentTable')as ID_output_lkp2
autogenerate 5;
Have fun with QV,
François
Hi Commonqlik
See the example by FlipSide here or below :
ProductTable:
Load * inline [
ProductID, ProductCategory, ComponentID
1, A, 123
2, B, 123
3, A, 333
4, C, 541
5, B, 221
];
ComponentTable:
Load * inline [
ComponentID,ComponentName
123, ABC
333, DEF
541, GHI
221, JKL
];
Data:
Load
Rowno() as ID,
Lookup('ComponentID','ProductID',rowno(),'ProductTable') as ID_output_lkp1,
Lookup('ComponentName','ComponentID',Lookup('ComponentID','ProductID',rowno(),'ProductTable'),'ComponentTable')as ID_output_lkp2
autogenerate 5;
Have fun with QV,
François