Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

header date into detail table

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)

2 Replies
Not applicable
Author

[History Sequence Number]    Sorry this is the join between the two tables.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand