I have the following error:
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
This happens after I run the following line of SQL
:
/* Listar todas as reuniões do utilizador onde esteja convidado*/
String sql = "SELECT M.ID, M.TITLE, M.DIA, M.HORA FROM MEETING AS M, MEETING_LIST AS ML WHERE (M.ID=ML.ID_MEETING AND ML.ID_UTILIZADOR=( SELECT ID FROM UTILIZADOR WHERE NOMEUTILIZADOR='"+ parcel.getUsername()+"' ) AND ML.STATUS=1 AND ML.INVITE=1)";
toClient = new AbstractMessage(database.submitQuery(sql));
The MEETING
table has the following attributes:
- ID, TITLE, OUTCOME, DAY, TIME, LOCATION
The MEETING_LIST
table has the following attributes:
- ID, ME_ID, ID_UTILIZER, INVITE, STATUS
The UTILIZADOR
table has the following attributes:
- ID, NAME, WORDER
The MEETING_LIST
table is a table that crosses users and meetings (many to many).