Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a requirement in which Region field if null from table 1 means all Region values from table2.
For example I have table Sales with Region a,b,c,d and i have one more table called access which aslo have Region field and if Region is null then it has to take all Region values from Saes i.e a,b,c,d.
Is their any way to generate this type of table in script. and it's not just Region field i have couple of other fields with same scenario and all this fields are from same table.
Thanks in advance.
Vidya.
You can use the Applymap function. But on what logic to define the region for the row.
Try something like this
Sales:
Load
Region as Region
....
Access:
Load distinct
Region,
Region as %Region
Load distinct
Region,
Null() as %Region
You can find better explanation here
Hi,
Can you come up with some sample file and example.
Try like this
Table:
Load
Region as Region,
'
'
'
FROM Table1;
Access:
Load distinct
Region,
Region as RegionTemp
FROM Table2
WHERE Len(Trim()) > 0;
Concatenate(Access)
Load distinct
Region,
Null() as RegionTemp (Instead of Null() use 'All' AS RegionTemp it is more meaningful)
FROM Table2;
Use RegionTemp as filter, Hope this helps you.
Regards,
Jagan.
use can use apply function
TableA:
mapping load field1,field2 resident from ur loaded table;
load field3,field4,field5,field6,
applymap('TableA','field2 ') as field7 from ur qvd
or u can u these generic keys