How do I execute an "insert into [tablename] values ([fieldname1], [fieldname2], ...) select [field1], [field2], ... from [anotherTableName]" ?
1 ) HQL documentation chapter 11 only explains "select" syntax.
2 ) session.createSQLQuery "Can not issue data manipulation statements with executeQuery()"
3 ) I don't want to instantiate many objects and save them. For performance reasons, I prefer one massive SQL request. But I still want to use HIbernate even for this request because database access is configured through it and I use it in other parts of my application.
Any idea on this would be greatly appreciated.
Loïc
|