I am trying to execute the query below:
String sql="create or replace view toprecords as select * from(select directory_name,file_name,sum(value) from tfidfvalues where directory_name =? group by(directory_name,file_name) order by(sum(value)) desc) where rownum<=10";
stmt = con.prepareStatement(sql);
stmt.setString(1, directory_names.get(x));
stmt.executeUpdate();
When I execute it in oracle it works fine but when I try to implement it in java it shows the following error:
java.sql.SQLException: ORA-01027: bind variables not allowed for data definition operations
SO how to overcome this exception?