Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all!
I need a script, what will export data from a mssql server once a day and saves this data into a qvd-file.
How can I check, whether the script runs today or not, while checking the existing data in the qvd-file?
In my Export from MSSQL I add a new column: today() as Date_Report
And before the Export from MSSQL there should be a Checkup, whether in the qvd-file exists any value (today) in the column Date_Report.
Here my actual code:
Tickets:
LOAD
*
FROM
[$(ExportPfad)Tickets.qvd] (qvd)
;
// HERE TO CHECK, WHETHER TO LOAD DATA FROM MSSQL OR NOT.
concatenate LOAD
ID,
Status,
ErfasstVonId,
InBearbVonId,
ErledigtVonId,
Datum,
ErstellungsDatum_DT,
FaelligDatum_DT,
ErledigtDatum_DT,
Nummer,
Tickettyp,
MandNr,
today() as Datum_Auswertung,
ApplyMap('CRM_Status_Mapping', Status, 'None') As StatusBez
;
SELECT
ID,
Datum,
ErfasstVonId,
InBearbVonId,
ErledigtVonId,
Status,
"ErstellungsDatum_DT",
"FaelligDatum_DT",
"ErledigtDatum_DT",
Tickettyp,
MandNr,
Nummer
FROM CRMU9.dbo."CRM_KM"
WHERE CRMU9.dbo."CRM_KM".Status < '2';
// END OF CHECK
store Ticketsinto [$(ExportPfad)Tickets.qvd];
Thanks four your help!
Hi @heid_f , please check the following topics in the qlik help documentation site
About QVDs
About Incremental Load
Hi @heid_f , please check the following topics in the qlik help documentation site
About QVDs
About Incremental Load