I am executing a statement like this
ResultSet res =
stmt.executeQuery("SELECT FIRST_NAME FROM USER vu, USER_PROFILE vup"+
"WHERE vup.USER_ID = vu.USER_ID "+
"AND vu.USER_ID = ( SELECT USER_ID "+
" FROM USER"+
" WHERE EMAIL_ID = '"+userName+"'"+
"AND PW_ENCRYPTED = '"+password+"')");
But it is returning an error like this
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
Add space at the start and end of the query lines. Like below