Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI expert,
I have CSV file which had a field name base date from 2015 to 2019 . i want to create multiple qvd based in Date field ,
LOADCAPNumber ,Date(Base Date,'MM/DD/YYYY') as [Orginal Date],
From,,,,,
Store ---- into ----
Below is a small sample I created and hope this helps:
Data:
Load * Inline [RecNo,Base_Date,Year,Amount10,01/10/2015,2015,10020,01/10/2016,2016,20030,01/10/2017,2017,30040,01/10/2018,2018,40050,01/10/2019,2019,50050,01/10/2019,2019,600];
DistinctYearsTable:LOAD Chr(39) & CONCAT(DISTINCT "Year",Chr(39) & Chr(44) & Chr(39)) & Chr(39) AS DistinctYearsresident Data;
LET vDistinctYears = FieldValue('DistinctYears', 1);DROP TABLE DistinctYearsTable;
FOR EACH vYear IN $(vDistinctYears)CurrentYear:NoConcatenateLOAD * ResidentDataWHERE Year = '$(vYear)';
STORE CurrentYear INTO 'C:\Temp\Data-$(vYear).qvd';DROP TABLE CurrentYear;NEXT
Drop Table Data;