Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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