Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody. I have some trouble in my work. All queries, in a database severely used here, have to change and use "prepared statement" (Oracle). I searched, but I can't found. How I can do that in Qlikview?
SELECT
*
FROM
ATE
WHERE
ATE.DT_ALTERACAO_REGISTRO BETWEEN TO_DATE('$(DataInicioExtracao)', 'dd/mm/yyyy HH24:MI:SS') AND TO_DATE('$(DataFimExtracao)', 'dd/mm/yyyy HH24:MI:SS')...
How I can use Oracle Prepared Statement to do this query? 🙂
I'm tried to make a bind using two dots, but I was have this error:
OleDb error - Connector reply error: ErrorSource: OraOLEDB, ErrorMsg: ORA-01008 : Not all variables bound
Script:
...
AND ATE.DT_ALTERACAO_REGISTRO BETWEEN TO_DATE(:"'$(DataInicioExtracao)'", 'dd/mm/yyyy HH24:MI:SS') AND TO_DATE('$(DataFimExtracao)', 'dd/mm/yyyy HH24:MI:SS')
...
Tales, one key thing to understand, the error being returned is not really from QlikView, it is coming from your Oracle Driver/Client, we are just passing it back to the log/user interface, so you really likely want to be on the Oracle forum.
Regarding running straight SQL in the QlikView Script, provided the client driver/connector is able to translate the code you are putting in our script editor, everything should run perfectly. I do know Oracle is quite particular etc. as we receive quite a few cases regarding Oracle issues, and in most cases they are syntax, configuration or driver related issues.
The only thing of which I can think is there may be something wrong in your Connect statement, you may want to try to use the Wizard to create that and then try to do the Select after the Connect string is working, and then add your Where clause etc., that way you should be able to narrow things further. Sorry I do not have a better answer at the moment.
Only other thing I have is the Help doc on things:
Regards,
Brett