1 Reply Latest reply: Feb 6, 2013 9:40 PM by Oleg Troyansky RSS

    How-To load sql query results in a table box

      Hello, I have started to use QlikView, and let me know if it is possible to load data from a SQL query in a table box "with restrictions", since the current way I do it duplicates the results of the query. To do this I made a sql query, but I do not know how to the table is formed according to this consultation. My SQl query:

          1. SELECT    DISTINCT
          2.     incidencias.idIncidencia,
          3.     incidencias.tituloI,
          4.     status_incidencia.statusI,
          5.     status_incidencia.idIncidencia
          6. FROM
          7.     incidencias,
          8.     status_incidencia
          9. WHERE
          10.     incidencias.idIncidencia=status_incidencia.idIncidencia
          11. AND
          12.     status_incidencia.idIncidencia=incidencias.idIncidencia

      With this query results are not duplicated, but not how to make the display table in Qlikview, I've now done shows as follows:


      and this is the interface structure QlikView:


      I researched a bit, and I think I need to load it from the script, but not sure, I hope you can help me.

        • Re: How-To load sql query results in a table box
          Oleg Troyansky

          It looks like you did everything correctly, and the Table box shows all the possible combinations of the 4 fields that you included in it.


          There is no direct load into table boxes from the script. You load the data into fields in the script, and then in the UI, you show the data using the sheet objects.


          It's a common mistake to think that the Table Object will show the direct results from the SQL Load. The table will show all possible combinations of the selected Fields, eliminating duplicates. The output will be very close, but not necessarily the same as the original data in the SQL table.