Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to load two mapping loads and two tables and for field renaming purposes.
The problem I am having is if there is the same combination of Oldname and Newname in the two tables, the rename is not performed.
RenameBISHAUL:
MAPPING
LOAD PhyLayoutSeq,
PhyCode
FROM DWPhysicalLayoutRecord.qvd (qvd)
WHERE PhyLayoutCode = 'BIS-HAUL';
ALLLayout:
LOAD PhyTransSeqID,
PhyLayoutCode,
PhyAccountCode,
PhyTransDate,
PhyTransTime,
PhyTransBatchRef,
PhyTransLogin,
[1],
[2],
[3],
[4],
[5],
[6]
FROM
DWPhysicalTransRecord.qvd
(qvd)
WHERE PhyLayoutCode = 'BIS-HAUL';
Rename fields using RenameBISHAUL;
RenameSHOTGRADE:
MAPPING
LOAD PhyLayoutSeq,
PhyCode
FROM DWPhysicalLayoutRecord.qvd (qvd)
WHERE PhyLayoutCode = 'SHOT-GRADE';
SHOTGRADELayout:
CONCATENATE
LOAD PhyTransSeqID,
PhyLayoutCode,
PhyAccountCode,
PhyTransDate,
PhyTransTime,
PhyTransBatchRef,
PhyTransLogin,
[1],
[2],
[3],
[4],
[5],
[6]
FROM
DWPhysicalTransRecord.qvd
(qvd)
WHERE PhyLayoutCode = 'SHOT-GRADE';
Rename fields using RenameSHOTGRADE;
The problem is specifically in relation to column '[1]' in both tables. This column in both tables ALLLayout and SHOTGRADELayout refers to the same PhyLayoutSeq and PhyCode (1 and 'REC_TYPE').
How can I get around this issue?
A component of the resulting table looks as below (see REC_TYPE and [1] - I want these to concatenate to REC_TYPE).
Thanks
Perhaps I should clarify this.
The fields being renamed are the numeric fields.
The first rename mapping table (RenameBISHAUL) looks as follows:
1 | REC_TYP |
2 | MIN_IDN_CON |
3 | MIN_IDN_SHF |
4 | MIN_TNE_HAU |
5 | MIN_IDN_PAD_FR |
6 | MIN_IDN_PAD_TO |
The second mapping table (RenameSHOTGRADE) looks as follows:
1 | REC_TYP |
2 | MIN_IDN_LOC |
3 | MIN_IDN_SHO |
4 | MIN_IDN_FLI |
5 | MIN_GR%_CU |
6 | MIN_GR%_CAM |