Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: ORA-00907: missing right parenthesis

3226374May 24 2016 — edited May 24 2016

1/please couls someone tell me where is the error: i got this message 'java.sql.SQLException: ORA-00907: missing right parenthesis '

2/my query returns a list of group_id,im i following the "grpPrivileges" correctly?

code:

  public List groupUG() {

    List grpPrivileges = new ArrayList();

    ResultSet resultSet = null;

    PreparedStatement createPreparedStatement

      getDBTransaction().createPreparedStatement("" +

                                                 "select distinct ug.GROUP_ID from USER_GROUP  ug\n" +

        " where   ug.GROUP_ID in(\n" +

        "select ag.GROUP_ID\n" +

        "from ACL__GROUP ag\n" +

        "where  ag.GROUP_ID= ug.GROUP_ID and ug.USER_ID=" + CurrentUser() +

        "and ag.DOCUMENT_ID=" + getDocumentId()+"",0);

    try {

      resultSet = createPreparedStatement.executeQuery();

      while (resultSet.next()) {

        grpPrivileges.add(resultSet.getInt(1));

      }

    } catch (SQLException e) {

      throw new JboException(e);

    }

    return grpPrivileges;

  }

This post has been answered by Sameh Nassar on May 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2016
Added on May 24 2016
7 comments
4,286 views