Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I need to know how to change a traffic jam on stock qty
that is
my database estrare me for each item no rows as there are warehouses
as if I have two stores the database creates me a line and each store has its quantity
Now I wish I would create the Loading tables with only the quantities of each stock
ahh each store has its own field and their name is LL MM as regards the warehouse and the qty field for the field quantities
this is a part of my SCRIPT (THAT DOES NOT WORK IN THE RED IN)
tab2:
LOAD
*,
CODE as CampoDiJoin,
Year (Date # (DATA, 'YYYYMMDD')) as YEAR,
Month (# Date (DATE, 'YYYYMMDD')) as MONTH,
Day (# Date (DATE, 'YYYYMMDD')) as DAY,
(LL) LL WAREHOUSE
(MM) MM WAREHOUSE
Thanks to all who can help me
luca
I attach the file in excel
Hi,
You can do this on front end using pivot table.
Any specific reason why you want to do this in script?
Regards,
Kaushik Solanki
1) pivot
2) generic load The Generic Load
excel and .qvw in the attachements
source:
generic
LOAD article,
description,
'magazzino ' & magazzino,
qta
FROM
[Copia di magazzino.xls]
(biff, embedded labels, header is 1 lines, table is Foglio1$);
Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='source' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo
CombinedGenericTable:
Load distinct article, description
FROM [Copia di magazzino.xls] (biff, embedded labels, header is 1 lines, table is Foglio1$);
For each vTableName in $(vListOfTables)
Left Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table [$(vTableName)];
Next vTableName