Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two fields
Load * Inline
[Countrycoede Name
In India
Us America
AU Australia
EU Europe
UK UnitedKingdom
Pk Pak ]
and i have 3rd table with country codes like below
CC Codes
AU ,
In,Us,
Uk,Pk,Eu,
Pk,
IN,Pk,Us,Uk,Au
i need result like
CC code CounrtyName
AU , Australia
In, Us, India, America
Uk, Pk, Eu, Unitedkingdom, Pak, Eeurope
Pk, Pak
IN,Pk,Us,Uk,Au India, Pak, America , UnitedKingdom, Austrealia
In India
i am used primary key as Country code i am getting output only where there is single country code if there are multiple country codes in one value it's showing blank i need output like above mentioned.
my result
CC code CounrtyName
AU , Australia
In, Us, -
Uk, Pk, Eu, -
Pk, Pak
IN,Pk,Us,Uk,Au -
In India
Need output
CC code CounrtyName
AU , Australia
In, Us, India, America
Uk, Pk, Eu, Unitedkingdom, Pak, Eeurope
Pk, Pak
IN,Pk,Us,Uk,Au India, Pak, America , UnitedKingdom, Austrealia
In India
Regards
Sra1
Hi, you can try with MapSubstring:
mapCountryName:
Mapping LOAD Upper(Countrycode), Name Inline [
Countrycode,Name
In,India
Us,America
AU,Australia
EU,Europe
UK,UnitedKingdom
Pk,Pak
];
Result:
LOAD *, MapSubString('mapCountryName',Upper([CC Codes])) as CountryName Inline [
CC Codes
AU ,
In,Us,
Uk,Pk,Eu,
Pk,
IN,Pk,Us,Uk,Au
] (delimiter is ';')
@Sra1bandi Please see below.
CountryCodes:
Mapping Load
Upper(Countrycode) as [CC Codes],Name Inline [
Countrycode,Name
In,India
Us,America
AU,Australia
EU,Europe
UK,UnitedKingdom
Pk,Pak
];
CCCodes:
NoConcatenate
Load *,
MapSubString('CountryCodes',Upper([CC Codes])) as Name
Inline [
CC Codes
AU
In,Us
UK,Pk,EU
Pk
In,Pk,Us,UK,AU
](delimiter is '|');
Exit Script;
Hi, you can try with MapSubstring:
mapCountryName:
Mapping LOAD Upper(Countrycode), Name Inline [
Countrycode,Name
In,India
Us,America
AU,Australia
EU,Europe
UK,UnitedKingdom
Pk,Pak
];
Result:
LOAD *, MapSubString('mapCountryName',Upper([CC Codes])) as CountryName Inline [
CC Codes
AU ,
In,Us,
Uk,Pk,Eu,
Pk,
IN,Pk,Us,Uk,Au
] (delimiter is ';')
@Sra1bandi Please see below.
CountryCodes:
Mapping Load
Upper(Countrycode) as [CC Codes],Name Inline [
Countrycode,Name
In,India
Us,America
AU,Australia
EU,Europe
UK,UnitedKingdom
Pk,Pak
];
CCCodes:
NoConcatenate
Load *,
MapSubString('CountryCodes',Upper([CC Codes])) as Name
Inline [
CC Codes
AU
In,Us
UK,Pk,EU
Pk
In,Pk,Us,UK,AU
](delimiter is '|');
Exit Script;