Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
heid_f
Contributor III
Contributor III

Check if A Table contains a specific value in the columns

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! 

Labels (1)
1 Solution

Accepted Solutions
QFabian
MVP
MVP

Hi @heid_f , please check the following topics in the qlik help documentation site

About QVDs

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/work-with-QVD-...

 

About Incremental Load

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/LoadData/use-QVD-files-i...

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.

View solution in original post

1 Reply
QFabian
MVP
MVP

Hi @heid_f , please check the following topics in the qlik help documentation site

About QVDs

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/work-with-QVD-...

 

About Incremental Load

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/LoadData/use-QVD-files-i...

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.