Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

baarathi
Contributor II

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
Honored Contributor III

Re: Sql to Qlik sense Transition

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
Contributor II

Re: Sql to Qlik sense Transition

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).

Community Browser