Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using SQL commands on script

Hi,

I need to update some Oracle's OLTP tables before runnning a QV script. I could create a stored procedure, schedule it to run, but it would be more usefull (for maintenance reasons) if these statements could be lines of a QV script. The lines are:

update brito.tbl_cad_brito a

SET a.dtfimhabil =(select dtfimhabilitacao from tb_contribuinte where nriecontrib=a.inscrest)

where exists(select dtfimhabilitacao from tb_contribuinte where nriecontrib=a.inscrest and NOT dtfimhabilitacao=a.dtfimhabil);

commit;

Is it possible?

regards,

Paulo Costa

2 Replies
Not applicable
Author

May be you will ran procedure to batch file. So just call the batch file (.bat) in the script by using EXECUTE command.

Gysbert_Wassenaar

It is possible. But make sure to enable the option "Open Databases in Read and Write mode" on the Settings tab in the script editor. Otherwise Qlikview will open a read-only connection. Of course you need also priviliges in the Oracle database that allow you to update records in Oracle in that table. And you need to check if the ODBC or OLEDB connection allows write commands. If the ODBC or OLEDB datasource is defined as read-only it you can't write to it.


talk is cheap, supply exceeds demand