Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Convert SQL query in Qlikview

Hi everyone, in these days i'm working on this query in SQL and i've to convert it in qlikview; but it doesn't return the same result when i tested the query in Oracle SQL Developer and Qlikview. So someone can help me to convert the query in the right way??

this is the query in SQL:

SELECT   GEANNO FILE_YEAR,

         GESEDE FILE_OFFICE,

         GENUME FILE_ID,

         GETIPO FILE_TYPE,

         DECODE ((SELECT   DISTINCT 'A'

                  FROM    invoices inv,invoices_files inv_file

                  WHERE   inv.account_id = 'F1'

                  AND inv_file.invoice_company_id = inv.invoice_company_id

                  AND inv_file.invoice_year = inv.invoice_year

                  AND inv_file.invoice_office = inv.invoice_office

                  AND inv_file.invoice_id = inv.invoice_id

                  AND inv_file.account_id = inv.account_id

                  AND inv_file.comm_responsible = inv.comm_responsible

                  AND inv_file.credit_responsible = inv.credit_responsible

                  AND inv_file.file_year = lavori_in_corso.geanno

                  AND inv_file.file_office = lavori_in_corso.gesede

                  AND inv_file.file_id = lavori_in_corso.genume

                  AND inv_file.file_type = lavori_in_corso.getipo

                  AND inv.invoice_date >(SELECT   last_day(MAX (scarico))

                                         FROM   lavori_in_corso

                                         WHERE   tipo != 'CR')),NULL,SUM (totaler),0) AS AMOUNT_EURO

FROM   lavori_in_corso

WHERE   scarico = (SELECT   MAX (scarico)

                   FROM   lavori_in_corso

                   WHERE   tipo != 'CR')

AND tipo = 'RF' AND coatti IN ('ST', 'RE')

GROUP BY GEANNO,

         GESEDE,

         GENUME,

         GETIPO

Tags (1)
2 Replies
Henric_Cronström
Not applicable

Re: Convert SQL query in Qlikview

QlikView doesn't interpret any SQL.

If you have a difference between the results of Oracle SQL Developer and QlikView, then you have a difference in how Oracle SQL Developer and Oracle ODBC interpret the query. I would try to figure out what this difference is. It could be easier than re-writing the query with QlikView Load statements. I don't know Oracle very well, but you should probably look in the documentation.

For instance: Is the NULL symbol the same in the two Oracle tools? Is the negation operator != the same? Etc.

HIC

Not applicable

Re: Convert SQL query in Qlikview

Hello,

were you able to get an answer for your query?

Regards,

Varsha