pavithra123
IS-IT--Management
Hi All,
I have two files in file A, I have the following entries like ( it will have the country codes )
UNITED_STATES_OF_AMERICA,1
EGYPT , 20
MOROCCO , 212
ALGERIA , 213
and in another file B, I have the following entries
46578,212
4363,1
904,213
I need to add in file A the first field in File B whenever the second field in file A matches with the second field in File B.
If there is no match for then the field will have a zero.
For eg: for the above entries there is no match for 20 so a zero must be added in the field.
The output would be something like this
UNITED_STATES_OF_AMERICA,1,4363
EGYPT , 20,0
MOROCCO , 212,46578
ALGERIA , 213,904
Any help would be greatly appreciated.
best regards
Prem.
I have two files in file A, I have the following entries like ( it will have the country codes )
UNITED_STATES_OF_AMERICA,1
EGYPT , 20
MOROCCO , 212
ALGERIA , 213
and in another file B, I have the following entries
46578,212
4363,1
904,213
I need to add in file A the first field in File B whenever the second field in file A matches with the second field in File B.
If there is no match for then the field will have a zero.
For eg: for the above entries there is no match for 20 so a zero must be added in the field.
The output would be something like this
UNITED_STATES_OF_AMERICA,1,4363
EGYPT , 20,0
MOROCCO , 212,46578
ALGERIA , 213,904
Any help would be greatly appreciated.
best regards
Prem.