LauJensen / clojureql

ClojureQL is superior SQL integration for Clojure
https://clojureql.sabrecms.com
Eclipse Public License 1.0
285 stars 39 forks source link

"insert into " support #144

Closed omefire closed 9 years ago

omefire commented 10 years ago

Is there any way to execute statements of the following form ?

"INSERT INTO table1(id, name, age) SELECT id, name, age FROM table2".

If there isn't, what's the best way for me to execute this ?

LauJensen commented 9 years ago

As far as I can see these are 2 separate quries that don't affect one another, so execute them as such.

(update-in! table1 {:id id :name name :age age}) @(project table2 [:id :name: age])

Reopen if this is not sufficent in your case.