Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to build a country hierarchy. Please help.
This is my data table where i have the country field.
SQL Select DEALER, COUNTRY,WAVE,...,....
From TABLE1 WHERE ENABLED='YES';
i created a below table and tried for country hierarchy
NODE_ID | NAME | PARENT_ID |
1 | ALL MARKET | NULL |
2 | GCC MARKET | 1 |
3 | Abu Dhabi | 2 |
4 | Bahrain | 2 |
5 | Dubai-SZR | 2 |
6 | Garhoud | 2 |
7 | Iraq | 2 |
8 | Jeddah | 2 |
9 | Jordan | 2 |
10 | Khobar | 2 |
11 | Kuwait - LR | 2 |
12 | Kuwait | 2 |
13 | Lebanon-JR | 2 |
14 | Lebanon-LR | 2 |
15 | Marrakech | 1 |
16 | Morocco | 1 |
17 | Oman | 2 |
18 | Qatar | 2 |
19 | Rabat | 1 |
20 | Casablanca | 1 |
21 | Riyadh | 2 |
22 | Sharjah | 2 |
23 | Tunisia | 1 |
24 | Algeria | 1 |
25 | Azerbaijan | 1 |
26 | Egypt | 1 |
Thanks.
My mistake. Try:
Hierarchy (NODE_ID, PARENT_ID, COUNTRY, Parent, COUNTRY, PathName)
Then use PathName. Else re-upload your sample qvw.
Update: Corrected the field reference
Try like:
Hierarchy(NODE_ID, PARENT_ID, NAME)
LOAD
NODE_ID,
PARENT_ID,
NAME
From <>;
Then in the front end use treeview in list box with '/' separator.
Hi,
I tried as below
COUNTRY_HIERARCHY:
Hierarchy (NODE_ID, PARENT_ID, NAME)
Select NODE_ID,
PARENT_ID,
NAME
From XX_JLR_MS_COUNTRY ;
But how to link this with Country in below table
Select DEALER, COUNTRY,WAVE,...,....
From TABLE1 WHERE ENABLED='YES';
Thanks
Well, try joing them like:
Tree:
Hierarchy(NODE_ID, PARENT_ID, COUNTRY)
LOAD
NODE_ID,
PARENT_ID,
NAME as COUNTRY ; // Preceding load
Select COUNTRY From <>;
Join
Load * From <YourTreeTable>;
Hi,
I tried and couldn't make it.
Please find the attached QV file.
Could you please help me.
Thanks
Use pivot like in attached qvw. For better understanding read: Hierarchies
Hi,
I need to display like this in a tree view. based this selection values should populate across all tabs.
All Market
GCC
KSA
Thanks.
just add one more field in the hierachy like:
Hierarchy (NODE_ID, PARENT_ID, COUNTRY, Path)
Now in the front end use this Path listbox and use tree view with separator '/'
Hi tresesco,
If i select ALL Market from Country list box it is not displaying the result in tables.
Thanks
Path is empty.
Please help me to fix this issue
Thanks