11 Replies Latest reply: Sep 29, 2015 5:12 AM by Jonathan Dienst RSS

    Help... how is the syntax to use inline table within other queries ??

      Dear all,

      I got a Inline Table called "Tipo_Documento" and I would like to use it to check a load of a Table called "Documenti st".

      QlikSense do not recognize the table name as I wrote it.

       

      using this sintax nothing works... ;-(

       

      FROM "Documenti st"

      LEFT JOIN Tipo_Documento ON "Documenti st"."Tipo Doc" = Tipo_Documento."Tipo Doc"

      WHERE "Documenti st".Anno=2015

      AND "Documenti st"."Tipo Doc" = Tipo_Documento."Tipo Doc"

       

      How is the right way and syntax to use the name of a Inline table within other query

       

      Tipo_Documento:
      LOAD * Inline [
      "Tipo Doc" , Descriz_Tipo_Doc
      F1,F1  Fattura
      F2,F2  Fatt. Immed.
      C1,C1  Nota accredito
      CPA,CPA Nota Accr. PA
      FPA,FPA Fattura
      F11,F11  Fattira diff.ta
      F21,F21  Fattura accomp.
      ];


      LIB CONNECT TO "Dinamico_Eos_BI_Local";


      //Buffer(incremental)
      LOAD "Id doc" ,
          "N doc",
          "Tipo Doc",
          Anno,
          "Id pagamento",
          "Id anag",
          date(Data, 'DD-MM-YYYY') as Data_Ft,
          Month(Data) As Mese_Ft,
          Year(Data) As Anno_Ft,
          Day(Data) As Giorno_Ft ,
          'Q-' & Ceil(Month(Data)/3) As Q,
          Stato,
          "Note",
          if (left("Tipo Doc",1)='C' , -TotImp , TotImp) as TotImp,
          if (left("Tipo Doc",1)='C' , -TotNI , TotNI ) as TotNI,
          if (left("Tipo Doc",1)='C' , -TotIva , TotIva ) as TotIva,
          if (left("Tipo Doc",1)='C' , -Totdoc , Totdoc ) as Totdoc,
          CodDiv,
          Cambio,
          CodAg,
          CausVendita;
      SQL SELECT "Id doc",
          "N doc",
          "Tipo Doc",
          Anno,
          "Id pagamento",
          "Id anag",
          Data,
          Stato,
          "Cod iva",
          "Documenti st"."Note",
          TotImp,
          TotNI,
          TotIva,
          Totdoc,
          CodDiv,
          Cambio,
          CodAg,
          CausVendita
      FROM "Documenti st"
      LEFT JOIN Tipo_Documento ON "Documenti st"."Tipo Doc" = Tipo_Documento."Tipo Doc"
      WHERE "Documenti st".Anno=2015
      AND "Documenti st"."Tipo Doc" = Tipo_Documento."Tipo Doc"
      ;