I'm new to Qlikview and need some basics to get started.
I have a large dataset which I need to bring in and perform a cartesian join on to extrapolate the dataset. I can't perform the extrapolation in Oracle as the dataset is too large. My options are to break the dataset down into manageable chunks but I'm sure that Qlikview would be able to do the query on the dataset - I just need to understand how.
So far I have the following dataset as a QVD :
/* Creates 16 rows of data / 1 column having the no.s 1 to 16 */
SELECT rownum r from DUAL CONNECT BY LEVEL <= 16;
Replace Store DS1 into C:\ProgramData\QlikTech\Documents\DSt1.qvd;
/* Creates large dataset */
SELECT di.ds_date ,
WHERE di.ds_date = to_date('17.05.2011','DD.MM.YYYY');
Replace Store DS2 into C:\ProgramData\QlikTech\Documents\DSt2.qvd;
/* Cartesian Join Datasets */
FROM C:\ProgramData\QlikTech\Documents\DSt2.qvd (qvd);
JOIN LOAD * FROM C:\ProgramData\QlikTech\Documents\DSt1.qvd (qvd);
Replace Store DSq into C:\ProgramData\QlikTech\Documents\DSt3.qvd;
/* Restructure the Dataset */
if(R=16,'A','9')))))))))))))))) as CLASS,
if(R=16,BCA_A,'9'))))))))))))))))) as AVAILABILITY
FROM C:\ProgramData\QlikTech\Documents\DSt3.qvd (qvd);
It's the last step here that I would like to able to perform using QV scripting - is there a way of doing this without having to build my datasets incrementally to QVD files. I'm new to QV and therefore it would be good to understand how to Query QVD or flat files efficiently.
Here's my original SQL statement that I'm trying to recreate.
SELECT di.ds_date ,
CASE WHEN S.R = 1 THEN 'W'
WHEN S.R = 2 THEN 'Y'
WHEN S.R = 3 THEN 'T'
WHEN S.R = 4 THEN 'B'
WHEN S.R = 5 THEN 'S'
WHEN S.R = 6 THEN 'U'
WHEN S.R = 7 THEN 'V'
WHEN S.R = 8 THEN 'K'
WHEN S.R = 9 THEN 'H'
WHEN S.R = 10 THEN 'M'
WHEN S.R = 11 THEN 'L'
WHEN S.R = 12 THEN 'Z'
WHEN S.R = 13 THEN 'Q'
WHEN S.R = 14 THEN 'I'
WHEN S.R = 15 THEN 'X'
WHEN S.R = 16 THEN 'A'
CASE WHEN S.R = 1 THEN BCA_W END W,
CASE WHEN S.R = 2 THEN BCA_Y END Y,
CASE WHEN S.R = 3 THEN BCA_T END T,
CASE WHEN S.R = 4 THEN BCA_B END B,
CASE WHEN S.R = 5 THEN BCA_S END S,
CASE WHEN S.R = 6 THEN BCA_U END U,
CASE WHEN S.R = 7 THEN BCA_V END V,
CASE WHEN S.R = 8 THEN BCA_K END K,
CASE WHEN S.R = 9 THEN BCA_H END H,
CASE WHEN S.R = 10 THEN BCA_M END M,
CASE WHEN S.R = 11 THEN BCA_L END L,
CASE WHEN S.R = 12 THEN BCA_Z END Z,
CASE WHEN S.R = 13 THEN BCA_Q END Q,
CASE WHEN S.R = 14 THEN BCA_I END I,
CASE WHEN S.R = 15 THEN BCA_X END X,
CASE WHEN S.R = 16 THEN BCA_A END A
FROM MY_ORACLE_TABLE a, /* filtered by a date range */
(select rownum r from DUAL CONNECT BY LEVEL <= 16) s