Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I am not sure this can be done but wanted to throw it out and see if anyone can help:
The Problem: I have two tables with Vendor Information listed and the vendor is spelled slightly different in both tables. Is there a way to do some match, fix, or anything else to correct the issue. Here is an example of what I am talking about:
Vendor Table 1
AEP-Energy
Vendor Table 2
AEPEnergy
In other words the Vendor name in both list is the same but spelled slightly different. Is there any tricks out there.
David
THe easiest way is this:
I think you have a vendor code, so startting from it create a xlsx (or a table) with code and correct name.
Load that xlsx and use its name as the only one
Hi David,
the purgchar('field','-') is one example.
You can use
1. Upper or lower functions if both the field values have same name but in different case
2. purgechar to remove cuh characters you find as a difference in between two names
3. trim for any spaces around the names
use Wildmatch function
Another option is to do a Mapping like:
map1:
Mapping Load * Inline [
Column1,Column2
AEP-Energy, AEPEnergy
...
];
Where AEP-Energy is the text it is in and AEPEnergy is the text you want it to be. Then do an apply map when you load field like:
applymap('map1', FIELD) as FIELD
Hope this helps!
Replace( Fileld,'-','')
or
if it was like this mean AEP-Energy Aep-Energy
use this one
upper(Replace( Field,'-',''))
Lower(Replace(Field,'-',''))
or
use Purgechar(field,'-')
// Rename the Field:
FieldMap:
Mapping SQL SELECT oldnames, newnames FROM datadictionary;
Rename fields using FieldMap;
// Rename the Table
Tab1:
Select * from Trans;
Rename table Tab1 to Xyz;
TabMap:
Mapping load oldnames, newnames from tabnames.csv;
Rename tables using TabMap;
// Rename the Fields
Alias ID as CustomerID;
Load * from Customer.csv;
or
Load ID as CustomerID, Name, Address, Zip, City, State from Customer.csv;