title: How to Call ResultSet in JDBC sql WHERE IN (?) condition
body: <p>I have two Different Database (SqlServer,Oracle) </p>
  
  <p><strong>SqlServer</strong> having CUSTOMER_ID information and 
  <strong>Oracle</strong> has CUSTOMER_ID and other column information </p>
  
  <p>I want to achive below scenorio (Get record set from 1st method and apply that valus as condition in (WHERE IN ) 2nd method )</p>
  
  <pre><code>public void getvariable_values() throws SQLException, ClassNotFoundException
  {
      System.out.println("Oracle Start Connecting Server");
      oracon = DriverManager.getConnection(oe_url, oe_user, oe_password);
      System.out.println("Oracle Connection succeed");
      Statement s1 = (Statement) oracon.createStatement();
      sql_rs_var = s1.executeQuery("SELECT CUSTOMER_ID FROM CUSTOMER_SERVER )");
      getDatafromsql(sql_rs_var);
  }
  
  
  
  public void getDatafromsql(Resultset inp_record) throws SQLException, ClassNotFoundException 
  {
  
      Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
      System.out.println("SQL Server Start Connecting ");
      Connection sqlcon = DriverManager
              .getConnection(s_url, s_username, s_password);
      System.out.println("Sql server Connection valid");
      PreparedStatement s1 = sqlcon.prepareStatement("SELECT TOP 6 * FROM documents where customer_id = ?");
      //Something want to apply like below for where in condition
      s1.setString( 1,inp_record);
      sql_rs = s1.executeQuery();
      setdataOracle(sql_rs);
      sqlcon.close();
  }
  </code></pre>
  
  <p>Please suggest how to apply full record set in WHERE IN condition for method (getDatafromsql) in SQL</p>