Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
I am trying to rename fields from a mapping table as described in the reference manual (page 325). However, I am getting an error "invalid object name: dict".
What am I doing wrong here?
dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];
FieldMap:
Mapping Select OldName, NewName from dict; //this is where error occurs.
Rename Fields using FieldMap;
Appreciate the help 🙂
You don't need to create the FieldMap. You've already created the mapping table named "dict" in the INLINE. See below.
-Rob
dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];
Rename Fields using dict;
In your FieldMap selection statement, you should use RESIDENT instead of FROM, so it should be:
Mapping Select OldName, NewName RESIDENT dict;
If I'm not wrong it should be mapping LOAD
and not mapping Select.
Let me know if it works.
Mapping Load and Mapping Select are two different things as per the documentation.
You don't need to create the FieldMap. You've already created the mapping table named "dict" in the INLINE. See below.
-Rob
dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];
Rename Fields using dict;
Thanks Rob 🙂