This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-11
Channels
- # announcements (1)
- # beginners (35)
- # calva (28)
- # cider (14)
- # cljdoc (6)
- # cljs-dev (42)
- # cljsrn (2)
- # clojure (14)
- # clojure-spec (6)
- # clojure-uk (1)
- # clojurescript (13)
- # data-science (1)
- # emacs (3)
- # joker (3)
- # kaocha (1)
- # klipse (1)
- # leiningen (3)
- # off-topic (4)
- # pathom (10)
- # rewrite-clj (1)
- # shadow-cljs (28)
- # sql (5)
This is probably an extremely basic ("dumb") question: I am trying to obtain the table names from several databases in a MSFT SQL Server, via the jtds driver. The hardcoded query works fine. I can't figure out how to parameterize the FROM part of the query, this is what I tried and it did not work:
(jdbc/execute! c ["select table_name from ? where TABLE_TYPE = 'BASE TABLE'" "AIRPORT.INFORMATION_SCHEMA.TABLES"])
Is this possible, if so, what I am doing incorrectly?I don't believe JDBC allows parameterization of the from
clause.
OK, thx. For this simple case, I can just create the entire string myself, and hand it to execute!.
@dcj Take a look at HoneySQL for a nice way to programmatically build queries. You'd be able to do that query with the from
as a parameter.