Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
i am new in qlikview , i am trying to mapping load in my code but i am getting error in my code .i want to map
[GSTRP] as Date column into FACT_MaintenanceOrderHeader .
below is my code;
Dim_OrderHdr:
Load
[AUFNR] as [Order_AUFNR],
[GLTRP] as [Basic fin. date_GLTRP],
[GSTRP] as [Bas. start date_GSTRP],
[GSTRP] as Date,
;
SQL Select AUFNR GLTRP GSTRP from AFKO where GSTRP >= '20120401'
;
//WHERE AUFNR IN (SELECT AUFNR from AFKO WHERE GLTRP Between '20100401' AND '20110430')
STORE * FROM [Dim_OrderHdr] INTO E:\ test\Dim_OrderHdr.QVD;
DROP TABLE [Dim_OrderHdr];
Dim_OrderHdrtest:
Mapping Load
Order_AUFNR,
Date,
from
E:\ test\Dim_OrderHdr.QVD;
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[AUFNR] as [Order_AUFNR],
[QMNUM] as [Notification_QMNUM];
SQL Select AUFNR QMNUM from AFIH
;
STORE * FROM [FACT_MaintenanceOrderHeader] INTO E:\ test\FACT_MaintenanceOrderHeaderbase.QVD;
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[Order_AUFNR],
[Notification_QMNUM],
ApplyMap('Dim_OrderHrdtest','O_AUFNR','unknown');
from
E:\ test\Dim_OrderHdr.QVD;
please do the needful:
can you post error message?
whatI notice you Need to pass a correct value to applymap and passfieldname without quotes
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[Order_AUFNR],
[Notification_QMNUM],
ApplyMap('Dim_OrderHrdtest',Order_AUFNR,'unknown') as MyDate;
from
E:\ test\Dim_OrderHdr.QVD;
Hi
You seem to have a comma after the date field in your mapping load this needs to be removed
Regards
Adrian
Dim_OrderHdrtest:
Mapping Load
Order_AUFNR,
Date
from
E:\ test\Dim_OrderHdr.QVD;
has one Comma too much
APPLYMAP has the fieldname without apostrophs, think that you refer to the field Order_AUFNR?:
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[Order_AUFNR],
[Notification_QMNUM],
ApplyMap('Dim_OrderHrdtest',O_Order_AUFNR,'unknown');
from
E:\ test\Dim_OrderHdr.QVD;
Hi in applymap map syntax we should not use single quates('') for field name and this filed must exits in current table.
see below
Dim_OrderHdr:
Load
[AUFNR] as [Order_AUFNR],
[GLTRP] as [Basic fin. date_GLTRP],
[GSTRP] as [Bas. start date_GSTRP],
[GSTRP] as Date,
;
SQL Select AUFNR GLTRP GSTRP from AFKO where GSTRP >= '20120401'
;
//WHERE AUFNR IN (SELECT AUFNR from AFKO WHERE GLTRP Between '20100401' AND '20110430')
STORE * FROM [Dim_OrderHdr] INTO E:\ test\Dim_OrderHdr.QVD;
DROP TABLE [Dim_OrderHdr];
Dim_OrderHdrtest:
Mapping Load
Order_AUFNR,
Date,
from
E:\ test\Dim_OrderHdr.QVD;
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[AUFNR] as [Order_AUFNR],
[QMNUM] as [Notification_QMNUM];
SQL Select AUFNR QMNUM from AFIH
;
STORE * FROM [FACT_MaintenanceOrderHeader] INTO E:\ test\FACT_MaintenanceOrderHeaderbase.QVD;
FACT_MaintenanceOrderHeader:
NoConcatenate
Load
[Order_AUFNR],
[Notification_QMNUM],
ApplyMap('Dim_OrderHrdtest',Order_AUFNR,'unknown');
from
E:\ test\Dim_OrderHdr.QVD;