Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there any possibility, we can get previous date data ?
means suppose I created a qvd on 7th Apr but on 9th Apr can we check 7th Apr qvd data.
(Date is not any field in my database)
I think it can be possible if I save daily created qvds with different name.. and when we need previous date data we access that qvd.
it is just an idea which I think, Can it be done automatic?
All replies are valuable ![]()
Thanks
Do you have separate QVD files for each date?
If so you can use the QvdCreateTime() function in your load script.
load
QvdCreateTime('C:\MyDir\MyFile.qvd') as Created,
.....
from 'C:\MyDir\MyFile.qvd' (qvd) ;
Can you add a date field in your data that you can include in the script that generates the QVD?
Can you reload the data for previous dates with a date field?
Thanks Colin,
I dont have separate qvd files.
I have to save qvds daily with different names.
And I also can't add Date field in my database.
Hi,
Create a variable with the date and the name of your QVD you add the name of the variable, example: the name of your QVD will be
09/ 04 / 2015_NameQVD.qvd
----------------------------------------------
Let vDate = date(today(),'DD/MM/YYYY'); // Create a variable
NameTable:
Load
*
....
from NameTale
;
STORE * FROM NameTable INTO $(vDate)_NameQVD.QVD;
DROP TABLE [NameTable ];
// yesterday
let date=date(Today()-1, 'YYYYMMDD');
table: load rowno() as field autogenerate 100;
STORE table into table_$(date).qvd (qvd);
DROP Table table;
// today, read yesterday qvd
let date_1=date(Today()-1, 'YYYYMMDD');
table: load * from table_$(date_1).qvd (qvd);
Thanks Santos,
If I will create vDate variable with today() then this today() will change daily with today date.
I want daily create a new qvd. so that we can use previous qvd to analyse previous result any time.
Hi,
Check this script for saving and reading data
// To save todays data to QVD
LET vToday = Date(Today(), 'YYYYMMDD');
Data:
Load
*
FROM DataSource;
STORE Data Into Data_$(vToday).qvd(qvd);
DROP Table table;
// To read yesterdays data
LET vYesterday = Date(Today() - 1, 'YYYYMMDD');
Data:
Load *
FROM Data_$(vYesterday).qvd (qvd);
Regards,
Jagan.
Hi,
Try this :
load
QvdCreateTime(path\QvdName) as New,
.....
from ...... ;
Regards,
Nagarjuna
Is it right every time it runs used the current date, if it runs at different times of day you can add time for distinguish from one another.
Let vDate =date( now() , 'DD/MM/YYYY hh:mm:ss'); // Create a variable
NameTable:
Load
*
....
from NameTale
;
STORE * FROM NameTable INTO $(vDate)_NameQVD.QVD;
DROP TABLE [NameTable ];