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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mmortsie1
Contributor II
Contributor II

Load Data from multiple QVD files

Hallo,

I Hope some one can help me i would like to load Data from 2 QVD files and save it as one. At the moment im doing it via two SQL tables using the query below. My problem is i dont know how to do this with QVD files. If some one could help me of on how to write the script for it.

SELECT

  R.ID,

  R.VOC,

  R.VOC_COUNTRY,

  R.VOC_MODEL,

  R.PLANT,

  R.V_LINE,

  R.TARGET_BUILD_DATE,

  R.ORDER_TYPE

  MONTH(R.TARGET_BUILD_DATE) AS DT_MONTH,

  DATEPART(ww, R.TARGET_BUILD_DATE) AS DT_WEEK,

  CAST(YEAR(R.TARGET_BUILD_DATE) AS VARCHAR) + '-' + CAST(MONTH(R.TARGET_BUILD_DATE) AS VARCHAR) AS DT_YEAR_MNTH,

  CAST(YEAR(R.TARGET_BUILD_DATE) AS VARCHAR) + '-' + CAST(DATEPART(ww, R.TARGET_BUILD_DATE) AS VARCHAR) AS DT_YEAR_WEEK,

  E.E_COL,

  E.E_LEN,

  E.E_VAL,

  E.FEATURE

FROM

  dbo.tbl_FCAST_R R,

  (

    SELECT DISTINCT

      CAST(E_COL AS INT) AS E_COL,

      CASE

        WHEN

          LEN(E_VAL) = 0 THEN 1

        ELSE

          LEN(E_VAL)

      END AS E_LEN,

      CASE

        WHEN

          LEN(E_VAL) = 0 THEN ' '

        ELSE

          E_VAL

      END AS E_VAL,

      FEATURE,

      V_LINE,

      M_YEAR

    FROM  

      dbo.tbl_F_E) E

WHERE  

  SUBSTRING(R.VOC, E.E_Col, E.C_Len) = E.E_Val

AND

  R.V_LINE = E.V_LINE

Regards

Markus

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Just before your select write the alias:

Eg:

MyTable:

Select

....

after the end write:

Store * from MyTable Into myFile.Qvd;

In this way you will store the table into a qvd file.

At this point instead of executing the query you can simply load from your qvd:

Load * from myFile.Qvd;

Let me know

mmortsie1
Contributor II
Contributor II
Author

Thanks for the info but that's not what im looking for. I want to get rid of the SQL query complete. I want Qlikview to do what the SQL query does by using two QVD files since the Query is based on two Tables as well

Regards

Markus