Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

2 Replies
hic
Former Employee
Former Employee

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
Author

Hello,

were you able to get an answer for your query?

Regards,

Varsha