Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I'am trying to merge 2 id's into one only, I've 2 keys in one table , 1215 and 1225 and i named them as AFTMARKET-1 and AFTMARKET-2 but now i want to merge both into AFTMARKET only, i want all values from 1215 and 1225 in the same.
1215 and 1225 are both raiserPlants.
Snippet of my script:
LOAD AETCNo as AetcId,
Trim(upper(RaiserPlant)) as RaiserPlant,
FROM
[..\QVDs\test.qvd]
(qvd)
RaiserPlantsNames:
LOAD * INLINE [
RaiserPlant, RaiserPlantName
1121 ,otherPlants
1215 ,NA Aftmkt-1
1225 ,NA Aftmkt-2
1128 ,otherPlants1
];
Thanks in advance.
Approach1:
LOAD AETCNo as AetcId,
Trim(upper(RaiserPlant)) as RaiserPlant,
FROM
[..\QVDs\test.qvd]
(qvd);
RaiserPlantsNames:
LOAD * INLINE [
RaiserPlant, RaiserPlantName
1121 ,otherPlants
1215 ,NA Aftmkt
1225 ,NA Aftmkt
1128 ,otherPlants1
];
Approach2:
LOAD AETCNo as AetcId,
Trim(upper(If(WildMatch(RaiserPlantName,'NA Aftmkt*'),'NA Aftmkt')) as RaiserPlantName,
FROM
[..\QVDs\test.qvd]
(qvd); // assuming that this qvd has already the mapped values in.
RaiserPlantsNames:
LOAD * INLINE [
RaiserPlant, RaiserPlantName
1121 ,otherPlants
1215 ,NA Aftmkt-1
1225 ,NA Aftmkt-2
1128 ,otherPlants1
];
Update: Corrected the field name
Approach1:
LOAD AETCNo as AetcId,
Trim(upper(RaiserPlant)) as RaiserPlant,
FROM
[..\QVDs\test.qvd]
(qvd);
RaiserPlantsNames:
LOAD * INLINE [
RaiserPlant, RaiserPlantName
1121 ,otherPlants
1215 ,NA Aftmkt
1225 ,NA Aftmkt
1128 ,otherPlants1
];
Approach2:
LOAD AETCNo as AetcId,
Trim(upper(If(WildMatch(RaiserPlantName,'NA Aftmkt*'),'NA Aftmkt')) as RaiserPlantName,
FROM
[..\QVDs\test.qvd]
(qvd); // assuming that this qvd has already the mapped values in.
RaiserPlantsNames:
LOAD * INLINE [
RaiserPlant, RaiserPlantName
1121 ,otherPlants
1215 ,NA Aftmkt-1
1225 ,NA Aftmkt-2
1128 ,otherPlants1
];
Update: Corrected the field name
Approach1 was simple and effective, thank you ![]()