title: ORA-00933: SQL command not properly ended: java
body: <p>I am taking domains from a text file and passing it to a query one by one.
  for first time the query is executing fine .. but when it takes the second domain and passing it to query getting error "ORA-00933: SQL command not properly ended"
   Below is the code </p>
  
  <pre><code>sql.append("select person_org_id,profile_type_id as NEXUS, profile_option_id,profile_option_value  from TABLE1 ");
              sql.append(" where profile_type_id=1 and person_org_id in (select person_org_id from TABLE2 where ");
              sql.append(" account_id in (select account_id from TABLE3 where prod_id=10001 and prod_inst_name = ?)) ");
  
              ps = con.prepareStatement(sql.toString());
              System.out.println("----------checkpoint -----------");
  
              ps.setString(1,domain_name);
              System.out.println("----------checkpoint 4-----------");
              rs= ps.executeQuery();
              System.out.println("----------checkpoint 5-----------");
  </code></pre>