Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

EliGohar
Contributor

Update database table Via data load editor

Hi All,

I'd like to know if it's possible to update a table on my database (Oracle) via qlik script (Data load editor)?

The scenario is like this:

1. Reading a value from a table - check if it's true/false.

2. if it's true then make some actions (like cleaning a qvd file from data) and update the value again to false.

Thanks for your help 🙂

Eli.

 

Labels (4)
4 Replies
MVP
MVP

Re: Update database table Via data load editor

You can find a (I hope) some idea for postgres and oracle dbms in

https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Store-a-QlikSense-table-directly-into-...

 

Highlighted
mark_costa
Contributor

Re: Update database table Via data load editor

Hi Eli, it is possible.
You can run any - or almost any - SQL Query from the Load Script.
So you can run commands like INSERT/DELETE/UPDATE commands as any other SELECT commands.
You can find some examples in this topic:
https://community.qlik.com/t5/QlikView-App-Development/QlikView-sql-insert-query-to-SQL-Server/td-p/...
EliGohar
Contributor

Re: Update database table Via data load editor

Thanks Mark_costa.

I'm using an ODBC connector to Oracle DB, when trying to run an INSERT command from Qlik Sense Script I get this error:

The following error occurred:
Connector reply error: SQL##f - SqlState: S1000, ErrorCode: 1456, ErrorMsg: [Oracle][ODBC][Ora]ORA-01456: may not perform insert/delete/update operation inside a READ ONLY transaction
 
When I'm trying to make the same INSERT command from Oracle SQL developer with the same user it succeeded.
 
What can be the reason?
 

 

mark_costa
Contributor

Re: Update database table Via data load editor

If you don't specify an user in your ODBC connection, for instance using trusted/integrated security, the ODBC uses the Qlik Sense Service Account user to run the SQL commands, so you have to make sure that you are using the same users. If possible take a look on the Oracle logs to see which user is hitting your database from Qlik Sense.