I have some problem trying to implement a simple JDBC query into a Java application.
So I have the following query:
SELECT D.*
FROM coda_tx c, do
executeQuery()
automatically adds a semicolon to a statement when executing it.
Change the line sb.append("';");
to sb.append("'");
.
Also you'll need to add spaces at the end or at the beginning of each line, your statements are invalid otherwise.
Add a white space at the end of each line so that the keyword on the next line is not clumped with it, e.g.:
sb.append("SELECT D.* ");
instead of
sb.append("SELECT D.*");
and also remove the trailing semicolon.