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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Component to delete in DB.

I'm sure that is very easy question, but I don't know what component is needed to delete in a table.
I'm trying with tPostgreSqlInput's component, and in the query:
delete from TABLE where TO_CHAR ( DATE, 'YYYYMM' ) = "+globalMap.get("period").toString()
But apperance this:
Exception in component tPostgresqlInput_2
org.postgresql.util.PSQLException: The query did not return any results.
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:236)
    at mdc.omel_0_1.omel.tPostgresqlInput_2Process(omel.java:1023)
    at mdc.omel_0_1.omel.tFileList_1Process(omel.java:885)
    at mdc.omel_0_1.omel.runJobInTOS(omel.java:3902)
    at mdc.omel_0_1.omel.main(omel.java:3684)
How I can delete in a table?
Thank you.
Labels (4)
11 Replies
Anonymous
Not applicable
Author

Finally I used tPostgresqlrow, this component does not return any value, I put the query as had in tPostgresqlInput and done what I wanted.
Thank you very much.
Anonymous
Not applicable
Author

You can use an advancement of this component. Instead of writing the where condition with the values in SQL you can use prepared statements. This will allow you to write the SQL without values instead set a ? for the value and in the advanced settings of the component set the actual values without any type conversion to string.