Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i have two Tables
... a Dimension Table .. (variable)
[DIMID, DIMTXT]
1, Height
2, Width
3, Length
4, Diameter
5, ...
6, ...
and a Table with Products and 4 Dimensions (fixed)
[ARTID, ARTNR, ARTDIM1, ARTDIM1VAL, ARTDIM2, ARTDIM2VAL, ARTDIM3, ARTDIM3VAL, ARTDIM4, ARTDIM4VAL]
1, 100, 1, 10, 2, 50,NULL, NULL, NULL, NULL
2, 110, 3, 1000, NULL, NULL ,NULL, NULL, 4, 20
What i want is a Table that has all Products + All Dimensions .. (when there is no entry .. then there is a NULL Value or something)
[ARTID, ARTNR, HEIGHT, WIDTH, LENGTH, DIAMETER, ..., ...]
1, 100, 10, 50, NULL, NULL, NULL, ..., ...
2, 110, NULL, NULL, 1000, 20, ... ,...
The Final Table (Dimension Columns) should be dynamic Generated by QV depending on the Dimension Table..
Much appreciate any hints how to transform a Table like this, i have no clue how to start.
Thank you!
This Posting gave me some hint.. Dynamic Field Name in Load Script
i could create the Fields by runtime... but i am stucking at doing something like..
LOAD *,
if(len(ARDIM1)>0, ARABM1, '') as ApplyMap('MAP_Dimensionen_KXT',ARDIM1)
or
Let MyDim = ApplyMap('MAP_Dimensionen_KXT',ARDIM1);
if(len(ARDIM1)>0, ARABM1, '') as $(MyDim);
;
SQL
Select ...
what can i do to fill my fields "variable" ?
This was a fail.. cause this gernerates a preceeding load which bloats up my table.. (for every Article Entry i got n-Dimension Entrys).