0

It's been a while since I've been using JDBC, so I'm having a hard time to figure out why the following statement works in SQLDeveloper but not as a PreparedStatement in JDBC.

select ko.id AS KOSTKALKID, 
au.auftragsnummer AS AUFTRAGSNUMMER, 
to_char(au.datesap,'DD.MM.YYYY') AS Bausoft_an_TS, 
fe.wert, to_char(fe.datesap,'DD.MM.YYYY') AS TS_Fertiggemeldet, 
to_char(fe.datum,'DD.MM.YYYY') AS TS_Fertigmeldung_Datum, 
bem.name AS TS_Montagemeister, 
to_char(au.tech_baueinweisung,'DD.MM.YYYY') AS TS_Baueinweisung, 
to_char(au.tech_baubeginn,'DD.MM.YYYY') AS TS_Baubeginn, 
to_char(au.tech_baufertig,'DD.MM.YYYY') AS TS_Bauende
from kostenkalkulation ko
inner join auftrag au on au.KOSTENKALKULATIONID=ko.id
left outer join fertigmeldung fe on au.auftragsnummer=fe.auftragsnummer
left outer join benutzer bem on bem.id=au.montagemeisterid
where au.auftragsnummer like '849%' or au.auftragsnummer like '848%' or au.auftragsnummer like '847%';

executing the PreparedStatemenmt leads me to the following error

java.sql.SQLException: ORA-00933: SQL command not properly ended

I understand that there are countless similar threads here on stackoverflow but none of them were helpful in my case

So, any advise would be appreciated. Thanks in advance.

Horn1347
  • 41
  • 2

0 Answers0