title: How can i solve PostgreSQL JDBC org.postgresql.util.PSQLException Error:
body: <p>I've got problem with PostgreSQL JDBC </p>
  
  <p>I use postgresql-9 and Glassfish if i execute the query with pgAdmin I don't have any error but in my application i have this error:</p>
  
  <blockquote>
    <p>SEVERE: org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou près de « d »<br>
    Position : 293<br>
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)<br>
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)<br>
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)<br>
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)<br>
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)<br>
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)  </p>
  </blockquote>
  
  <p>This is my java code</p>
  
  <pre><code>PreparedStatement st = con.prepareStatement("SELECT d.refdossier, d.status, d.date_validation, d.date_last_update,"
                          + "d.id_dossier,d.contrat_signe, d.etat_avancement,c.nom_pre_cont, c.num_piece_id,  c.date_piece_id,"
                          + "c.lieu_piece_id,  c.dat_nai_con, c.tel_con, fax_con,  c.email_con,g.libellegouvernoratar ,del.libelledelegationar"
                          + "FROM dossier d JOIN contact c on c.id_contact=d.id_dossier JOIN gouvernorat "
                          + " g on g.codegouvernorat=c.gouv JOIN delegation del on del.codedelegation=c.delegation"
                          + " WHERE d.id_dossier="+84);
  
  res = st.executeQuery();
  </code></pre>