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,
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))
WHERE tipo != 'CR')),NULL,SUM (totaler),0) AS AMOUNT_EURO
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.