Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date in the header file but not in the detail record.
I'm trying to create a Common Calendar so I need the date in the detail record so I can use it to get the dates in the Common Calendar Table using a Item Number reference. More information in the middle of these loads(below) but left it out.
I need to get the Dayend Date in the Sales_Detail so that I can link to another table by WarehouseItemKey to be used in Common Calendar.
I know that I can reload the information that is pulled into the qvd but is there a way to just do it in the SQL?
Thanks
Lynda
Sales_Header:
LOAD
[Dayend Date],
right(left([Dayend Date] , 4), 2) & '/' &
right([Dayend Date], 2) & '/20' &
left([Dayend Date], 2)
as DayEndDate, //renamed to try and tie to Sales calendar
[Warehouse ID] as [Sales Warehouse ID]
FROM
C:\ProgramData\QlikTech\SourceDocuments\QVD\HSHED.qvd
(qvd)
Sales_Detail:
LOAD
[Item Number] as HSDETITEMNUMBER,
[Warehouse ID] & [Item Number] as WarehouseItemKey,
[Warehouse ID],
ApplyMap('Warehouse_Names', [Warehouse ID]) as [Warehouse Name],
[Warehouse Location]
FROM
C:\ProgramData\QlikTech\SourceDocuments\QVD\HSDET.qvd
(qvd)
[History Sequence Number] Sorry this is the join between the two tables.
I don't think you need the header date in the details table. The header table should already be associated to the details table by the History Sequence Number. So you can simply create your common calendar on the header date. If you select a date in the calendar you will automatically get all the details belonging to the header with the header selected date.