Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
eliotm
Contributor
Contributor

Update single column in oracle

We're trying to update a single column in a table, using a context variable. All rows in the table should be updated. The equivalent sql would be "update our_table set col="+context.MYVAR.
I can't make this work using tFixedFlowInput or directly from tJavaRow piped into an OracleOutput component. I am told the schemas do not match.
I have selected the "Field Options' in the output table and just selected the one column to update. I am either get the schemas error or a Select error.

Any suggestions would be welcome.
Labels (3)
2 Replies
Anonymous
Not applicable

Hi
For update, you have to set one column as a key on the schema of tOracleOutput, there should at least two columns on the schema. You just want to update a single column, you can use tOracleRow to execute a query.
"update our_table set col="+context.MYVAR

Best regards
Shong
eliotm
Contributor
Contributor
Author

Hi, thank you. Yes, I can do this with straight sql but was exploring if/how I could use the GUI.
I got this to work using your suggestion, but the execution is very slow, I think because it is doing the join. In this case, I just need to update all rows so a join wouldn't normally be needed.
Is there a way I can do this using the tELT components? One possible problem -- are the context variable available in the ELT components, or is there a way I could pass them in?
Thank you.