Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i have a sql table which has 2015 whole data.
from this table, i want to load monthly datas in qlikview and store in qvd.
Sql date format is like 'YYYY-MM-DD'
How can i do this.
Please help.
Perhaps like this:
Temp:
LOAD *, Month(MyDate) as Month
SQL Select * From My2015Table;
For i=1 to 12
MonthlyData:
Load * Resident Temp Where num(Month) = $(i);
Store MonthlyDate into MonthlyData2015_$(i);
Drop Table MonthlyData;
next
Perhaps like this:
Temp:
LOAD *, Month(MyDate) as Month
SQL Select * From My2015Table;
For i=1 to 12
MonthlyData:
Load * Resident Temp Where num(Month) = $(i);
Store MonthlyDate into MonthlyData2015_$(i);
Drop Table MonthlyData;
next
Hi,
1) load the distinct date field
2) create one variable to get the no of rows in the table
3) use for loop
4) in for loop to pass the query and use the where condition to load only particular month data only
5) create a qvd. qvd name should be QVDNAME_MONTH
------------------------------------------
Temp:
LOAD DISTINCT
Date AS Date_Temp
FROM
query;
LET v_nr_folders = NoOfRows('Temp');
FOR i=0 to $(v_nr_folders)-1
LET v_Date = Peek('Date_Temp',$(i),'Temp');
QUERY
SQL SELECT *
FROM TABLE NAME WHERE Date = '$(v_Date)';
STORE TableName into Path\$(v_File_Name).qvd;
drop table TableName;
next