DB Reader Error

Why does the DB Query Reader node return an error for a basic query like:

select sysdate from dual

ORA-00933: SQL command not properly ended

Knime generated query:

SELECT * FROM (select sysdate from dual) ‘‘tempTable_6172826319873019024’’ WHERE rownum <= 10

It can’t evaluate the query, but it will run it successfully.

@kevinnay I think this is one instance where a testing thru a VIEW (which is what this evaluate does, limiting the number of lines processed) will not work but the result will still work.

1 Like

Hi @kevinnay ,

usually on DB Query Reader, the “ORA-00933: SQL command not properly ended” appears if you have included a semicolon on the end of the select statement.

The statement select sysdate from dual runs without issue when I try it in a DB Query Reader.

As @mlauber says, there are times when the mechanism used to preview/evaluate results can have problems because it tries to wrap you query as a subquery/view. If you have any comments, or end of statement character (such as ;) these will cause problems.

If you are still having problems, please post a couple of screenshots of the node config and the errors occurring.

1 Like

Yes I’m aware of that and in this case that wasn’t the issue, but thanks.