I'm using CloverETL Community version.
I wish to use DBExecute with some simple (Postgres) SQL such as: select setval('table_col_seq',1); or select count(*) from table;
I always get the error: "org.postgresql.util.PSQLException: A result was returned when none was expected." How do I get around this? I cannot change the db from PG btw.
Regards
Chris
I wish to use DBExecute with some simple (Postgres) SQL such as: select setval('table_col_seq',1); or select count(*) from table;
I always get the error: "org.postgresql.util.PSQLException: A result was returned when none was expected." How do I get around this? I cannot change the db from PG btw.
Regards
Chris
-
Hello Chris,
to get data from database use DBInputTable component. DBExecute component can execute update or procedure call. You can find examples of reading/writing data to/from databases among our examples (http://sourceforge.net/projects/clovere ... p/download) -
Thanks.
I have read the documentation in some detail. If I enter: select setval('table_col_seq',1); into DBExecute (I'm not interested in return data), it fails with the error given previously. How do I avoid getting this error?
Regards
Chris -
Select statement can't be executed with DBExecute component. If you want to execute the statement, that (may) returns the result set, you have to use DBInputTable. -
Thanks!
Perhaps you could update the DBExecute doc section to make this clear.
Regards
Chris
Please sign in to leave a comment.
Comments 4