Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<String> trialArr = new ArrayList<String>();
- String strQuery = "show columns from :table: like '%Name'";
- Query query = null;
- Query finalQueryExec = null ;
- for(int i = 0; i < TableNameList.size(); i++)
- {
- query = session.
- // this works
- createSQLQuery(strQuery.eplace(":table:", TableNameList.get(i)));
- // this does not work
- finalQueryExec = hbses.createSQLQuery(":qry:").replace(":qry:", query.list().get(i));
- trialArr.add(finalQueryExec.toString());
- }
- finalQueryExec = hbses.createSQLQuery(":qry").setparameter("qry", query.list().get(i));
Add Comment
Please, Sign In to add comment