Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

Historization with QVD

Hello,

I used a QVD to stock all data :

////*************set the qvd folder path************

SET vQvdPath=C:\qvdtest;

QVD:

LOAD * FROM (qvd) ;//source des QVDs historisés

Concatenate:

LIB CONNECT TO 'Microsoft_SQL_Server;

LOAD

    * WHERE  "date"= Today()

     ;

    

SELECT

date,

Statut

Name,

     last_name

FROM base.dbo."Table" 

// ////*********store QVD**************

STORE [QVD] into [$(vQvdPath)\QVD.qvd](qvd);

Now i need the historization of the Statut result per month.

how i can do it thank you

Regards

5 Replies
vlad_komarov
Partner - Specialist III
Partner - Specialist III

If I understand you correctly, you need to have the report of the Statut field per month, correct?

If so, just extract the Month from your Date field in the script:

SELECT

date,

Month(date) & '-' & Year(date) as MonthYear,

Statut,

......

FROM base.dbo."Table"

And create a chart using MonthYear as dimension and needed aggregate function (Count, Sum, Max, etc of Statut) as Measure:

sum(Statut), for example....

Regards,

Vlad

beck_bakytbek
Master
Master

Hi Zied,

if i understand right, with historization: you can save your qvd's in this way:

for instance:

let vFileDate = Date(Today(),'DD-MM-YY');

yout table:

load

...

from your source

and store into test $(vFileDate).qvd(qvd)

i hope that helps

beck

zied_ahmed1
Specialist
Specialist
Author

Hello every body i want to stock the value of the Statut everyday...for example the Statut of today is 1 tomorrow is 2 so i need to have 2 rows of statut and not crush the previous Statut

satheshreddy
Creator III
Creator III

Hi Zied,

use incremental load and use where notexit(Statut)

Regards

Sathish

zied_ahmed1
Specialist
Specialist
Author

Hello everybody :

For example

in April : 

there is 15 days the value of this Staut  = 0

            13 days value of Staut 1

             03 days value of Statut 2

so in April we will display Statut = 0

hope you understand me