2 Replies Latest reply: Feb 14, 2018 2:20 AM by Baarathi V RSS

    Sql to Qlik sense Transition

    Baarathi V

      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?

        • Re: Sql to Qlik sense Transition
          P M

          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.