Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create multiple QVDs based on a Product Line ID from a RESIDENT table.
I can't understand what is wrong with the following code -- PLEASE HELP!
SET vQVD_Stage='C:\Users\hayetom\Qlikview\QlikView Working Folders\QVD\';
AllData:
LOAD * FROM $(vQVD_Stage)Data_Source.qvd (qvd);
Product_Line_List:
LOAD DISTINCT PROD_LN_ID as SaveProd_Line_ID
RESIDENT AllData;
LET vNumProductLines = NoofRows ('Product_Line_List');
SET ii = 0;
FOR ii = 0 to $(vNumProductLines) - 1
LET vSaveProd_Line_ID = peek ('SaveProd_Line_ID', ii, 'Product_Line_List');
DataSubSet:
LOAD *
RESIDENT AllData
WHERE (PROD_LN_ID = '$(vSaveProd_Line_ID)');
STORE DataSubSet INTO $(vQVD_Stage)Data_Source_For_$(vSaveProd_Line_ID).qvd (qvd);
DROP TABLE DataSubSet;
NEXT
This will load the exact same fields as exist in AllData, so the data will be appended to AllData and DataSubSet won't be created. Try adding a noconcatenate to the load statement:
DataSubSet:
NOCONCATENATE
LOAD *
RESIDENT AllData
This will load the exact same fields as exist in AllData, so the data will be appended to AllData and DataSubSet won't be created. Try adding a noconcatenate to the load statement:
DataSubSet:
NOCONCATENATE
LOAD *
RESIDENT AllData
Hi Hayes,
the table 'AllData' concatenated with 'DataSubSet'
SET vQVD_Stage='C:\Users\hayetom\Qlikview\QlikView Working Folders\QVD\';
AllData:
LOAD * FROM $(vQVD_Stage)Data_Source.qvd (qvd);
Product_Line_List:
LOAD DISTINCT PROD_LN_ID as SaveProd_Line_ID
RESIDENT AllData;
LET vNumProductLines = NoofRows ('Product_Line_List');
SET ii = 0;
FOR ii = 0 to $(vNumProductLines) - 1
LET vSaveProd_Line_ID = peek ('SaveProd_Line_ID', ii, 'Product_Line_List');
DataSubSet:
NoConcatenate
LOAD *
RESIDENT AllData
WHERE (PROD_LN_ID = '$(vSaveProd_Line_ID)');
STORE DataSubSet INTO $(vQVD_Stage)Data_Source_For_$(vSaveProd_Line_ID).qvd (qvd);
DROP TABLE DataSubSet;
NEXT
-------------
Hola Hayes,
la tabla AllData se esta concatenando con DataSubSet