2 Replies Latest reply: Jun 3, 2011 6:04 PM by Erich Shiino RSS

    Problem in developing a SQL Querry in QlikView sense

      Please find the attached file for the SQL Querry,

       

      The difficulty about this querry is, there are multiple joins in this (Right as well as Left Join)

      and m not able to define the joins Reason is, the table whr left join is applied with one table and the same table has right join with some other table

       

      For example:

       

      in this querry,  l.assetid(+)=d.assetid also d.supplierid=m.supplierid(+)

       

      left join is done w.r.t some joining condition then again that table is right joined w.r.t different joining condition with different table

       

      Please let me know If m constructing the querry in QlikView how should i place the table for the joins so that the data gets validated as per the SQL Querry

       

       

       

      I also tried to run the sql querry but getting the File .\extdata.cpp  error and has no answer for it.

      Please help on this ........ Please refer the Querry attached with this.

        • Problem in developing a SQL Querry in QlikView sense

          Hi prashantadhav82,

           

          This may not be a direct answer but just a recommended way of managing long and relatively complex query.

           

          Ensure that the query produces a resultset working with it outside of QlikView. Assuming that the query is good, my recommendation is to create a view with the query. Then in QlikView, just use a select query to extract data from the view. That will help keep your QlikView document clean and debugging may become simple.

            • Problem in developing a SQL Querry in QlikView sense
              Erich Shiino

              Hi,

              First, I agree with QueueWeRavn

               

              ... well I had problems like this before, trying to run a complex query directly from QV.

              But, as far as I could go, the problem was with my drivers. Apparently I couldn't use some function from there (e.g. NVL)

               

              So, can you try to remove those lines with this expressions for testing purposes? If that's your case, you will need to replace them using a Load statement above sql select .

               

              Hope this helps,

               

              Erich