Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
baarathi
Creator III
Creator III

Sql to Qlik sense Transition

SQL SELECT  A."T",

    A."ANO",

    A.B,

    A.P,

    A.PL,

    A."S",

    A."DNO",

    A.MA,

    A.F1,

    A."mck",

    A."vu",

    A.tk,

    B.l AS LI,

    A.l AS PLI;

FROM (select "T",

              "ANO",

              B,

              P,

              PL,

              "S",

              "DNO",

              MA,

              F1,

              "mck",

              "vu",

              tk,

              l

      from Z.Tek where year(T) >= 2004 and year(S)>=2004) A

    left join (

    select distinct mck

                ,S

                ,l

        from Z.Tek where year(T) >= 2004 and year(S)>=2004 and ano like '0%') B

     on A.mck = B.mck AND A.S = B.S;



How implement this in qliksense script, does it support inner load similar to inner select in sql?

2 Replies
prma7799
Master III
Master III

Try like this

NewTable:

Load

    "T",

    "ANO",

    B,

    P,

    PL,

    "S",

    "DNO",

     MA,

     F1,

    "mck",

    "vu",

    tk,

    LI,

    PLI;

SQL SELECT  A."T",

    A."ANO",

    A.B,

    A.P,

    A.PL,

    A."S",

    A."DNO",

    A.MA,

    A.F1,

    A."mck",

    A."vu",

    A.tk,

    B.l AS LI,

    A.l AS PLI;

FROM (select "T",

              "ANO",

              B,

              P,

              PL,

              "S",

              "DNO",

              MA,

              F1,

              "mck",

              "vu",

              tk,

              l

      from Z.Tek where year(T) >= 2004 and year(S)>=2004) A

    left join (

    select distinct mck

                ,S

                ,l

        from Z.Tek where year(T) >= 2004 and year(S)>=2004 and ano like '0%') B

     on A.mck = B.mck AND A.S = B.S;


Store NewTable into NewTable.qvd(qvd);



Then used above QVD in your data model.

baarathi
Creator III
Creator III
Author

No Sir, I have already created the qvd for Z.Tek, without any inner select. I want to perform this inner select kind of function in Load (fetching data from qvd).