Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QV Experts,
I have following requirements ,can you please help?
I have one table LOG having structure
| No | Tablename |
| 1 | A |
| 2 | B |
| 3 | C |
I have another table LOG_details
| Tablename | Field | Value |
| A | type | 1 |
| A | type | 2 |
| B | type2 | t1 |
| B | type2 | t2 |
| B | type3 | s1 |
| B | type3 | s2 |
| C | temp | p1 |
| C | temp | p2 |
I have QVDs created for the Tables A, B, C which are having all fileds rather than available in LOG_details table.
I need to join Location table with the tables A,B,C having common field LOCATIONID.
That means I want to join these table including the fileds wich is available in LOG_details table.
Following would be the scenario
Location:
load
LOCATIONID,
Field1,
Field2,
Field3,
Field4
From location.qvd
left join
load
LOCATIONID,
type
From A.qvd
left join
load
LOCATIONID,
type2,
type3
From B.qvd
left join
load
LOCATIONID,
temp
From C.qvd
So, first I need to check in the LOG table which tables need to be added.
den from LOG_details which fileds need to be added.
How do I achieve this
Hi,
pardon, I really not understand your problem, does your script work?
gereetings from Munich
Martina
Hi Martina,
Can you tell me what you didnt uderstand?
To make the field list from LOG_Details you can use Group By laod and concat(Field, ', ') as aggregation function.
To get the field list value from aggregated table and assign it to a variable you can use lookup() finction.
Then you can parametrize your loads with $() statements and that variable.
You can also parametrize A,B,C qvd file names with the same aproach.
Can you attach some Dummy Excel sheets and a Screen shot of OUTPUT how you want .....