Excellent. Thank you!!
Tim -----Original Message----- From: Kasper Sørensen [mailto:[email protected]] Sent: Wednesday, January 10, 2018 11:07 PM To: [email protected] Subject: Re: INSERT with a SELECT subquery EXTERNAL Hi there, No that's not available. But you do get something quite equivalent with this: Table table = dataContext.getTableByName("us_south_es_etg"); dataContext.executeUpdate(callback -> { try (DataSet ds = dataContext.query().from("us_south").selectAll().execute()) { while (ds.next()) { callback.insertInto(table).values(ds.getRow()).execute(); } } }); 2018-01-10 10:15 GMT-08:00 Tim Kingsbury <[email protected]>: > Hello, > > Using Metamodel, is it possible to build an INSERT statement that is > paired with a SELECT subquery? For example: > > INSERT TABLE `us_south_es_etg` > SELECT > `lon`, > `lat`, > `number`, > `street`, > `unit`, > `city`, > `district`, > `region`, > `postcode`, > `id`, > `hash` > FROM us_south; > > > Any suggestions would be greatly appreciated! > > > Tim > >
