Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

write in Oracle database table

Hello
is there a way to write in an oracle database while running the script in Qlik sense?

I can walk on water when it freezes
Labels (1)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @ali_hijazi 

you will need to make some configuration changes if you want to execute non-select queries. This is documented on help side:

https://help.qlik.com/en-US/connectors/Subsystems/ODBC_connector_help/Content/Connectors_ODBC/How-to...

 

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

7 Replies
vincent_ardiet_
Specialist
Specialist

You can put what you want after the SQL keyword, of course it depends of the user rights of the account set in the connection.
For example, in my company, we are launching stored procedures to prepare the data or to acknowledge that we manage to do it, in order to receive incremental datasets.
Like this:

IF('$(vAckSuccessFlag)' = 'N') then
            SQL CALL pkg_dwh.pr_acksync;
            ...
 



ali_hijazi
Partner - Master II
Partner - Master II
Author

Hello thank you for your reply
what I want is read from a database (load data into memory)) then insert it in another database
now the script that you wrote above:
\SQL CALL pkg_dwh.pr_acksync

but the query after the SQL should return a result set; I cannot put insert into table; 
kindly advise

I can walk on water when it freezes
vincent_ardiet_
Specialist
Specialist

No there is no need of a dataset in return.
We are also doing such command:

SQL alter session set NLS_DATE_FORMAT = 'DD-MON-RR';
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @ali_hijazi 

you will need to make some configuration changes if you want to execute non-select queries. This is documented on help side:

https://help.qlik.com/en-US/connectors/Subsystems/ODBC_connector_help/Content/Connectors_ODBC/How-to...

 

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
vincent_ardiet_
Specialist
Specialist

Or use OLEDB 🙂

 

ali_hijazi
Partner - Master II
Partner - Master II
Author

it seems to work; I got the insufficient privileges from Oracle server
though I remember once I tried to have an insert statement and I got error from Qlik itself saying what sounded like the query has to return a result set

ali_hijazi_0-1701356445924.png

but now if I have a table T in memory (loaded in Qlik)
what would be the syntax to read rows from T and insert them into a database table?

 

I can walk on water when it freezes
vincent_ardiet_
Specialist
Specialist

You will have to do a loop across all rows of T and do your inserts one by one.