Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have attached 3 tables,
Item Sales contains Item, store and sales per week.
Item Budget contains Item, area and weekly budget,
Store Info contains store and its area.
Also, column week in first 2 tables has totally different value.
What script should I use to load them correctly? Please share the script instead of qvw as I could not open 3rd party's qvw file. thanks.
Correctly depends on your requirements
Sales:
LOAD [Item #],
[Store #],
Sales,
replace(Week, '#', '') as Week,
'Sales'as Table
FROM
[Item Sales.xls]
(biff, embedded labels, table is Sheet1$);
left join (Sales)
LOAD [Store #],
Area
FROM
[Store Info.xls]
(biff, embedded labels, table is Sheet1$);
Concatenate (Sales)
LOAD [Item #],
Area,
Budget,
replace(Week, 'Week', '') as Week,
'Budget' as Table
FROM
[Item Budget.xls]
(biff, embedded labels, table is Sheet1$);
Correctly depends on your requirements
Sales:
LOAD [Item #],
[Store #],
Sales,
replace(Week, '#', '') as Week,
'Sales'as Table
FROM
[Item Sales.xls]
(biff, embedded labels, table is Sheet1$);
left join (Sales)
LOAD [Store #],
Area
FROM
[Store Info.xls]
(biff, embedded labels, table is Sheet1$);
Concatenate (Sales)
LOAD [Item #],
Area,
Budget,
replace(Week, 'Week', '') as Week,
'Budget' as Table
FROM
[Item Budget.xls]
(biff, embedded labels, table is Sheet1$);
Perfect! Thanks.