# Query.jl + ODBC.jl

**URL:** <https://discourse.julialang.org/t/query-jl-odbc-jl/13590>\
**Category:** General Usage\
**Created:** [August 16, 2018, 10:12pm UTC](https://discourse.julialang.org/t/query-jl-odbc-jl/13590 "2018-08-16T22:12:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [August 16, 2018, 10:12pm UTC](https://discourse.julialang.org/t/query-jl-odbc-jl/13590/1 "2018-08-16T22:12:21Z")

</div>

I’m looking for some simple examples of using Query.jl to connect to a database via ODBC.

Any pointers?

BTW, @davidanthoff, I very much enjoyed your workshop at JuliaCon and getting to talk with you!

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [August 16, 2018, 10:30pm UTC](https://discourse.julialang.org/t/query-jl-odbc-jl/13590/2 "2018-08-16T22:30:55Z")

</div>

ODBC.jl and Query.jl are mostly orthogonal; you can connect to a database, execute a query, and return the results as a DataFrame by just doing `ODBC.query(dsn, "select a, b from ....")`. You can also execute a query and let Query.jl manage getting the results by doing `ODBC.Source(dsn, "select a, b from ...") |> @map(_.a) |> DataFrame`. I believe that should work, but I haven’t tried it personally.

Do also note that ODBC.jl hasn’t been updated for 1.0 yet, so you’ll need to try things out on 0.6 for now. I should be able to update it to be 1.0-ready pretty soon, so stay tuned.

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [August 17, 2018, 2:02am UTC](https://discourse.julialang.org/t/query-jl-odbc-jl/13590/3 "2018-08-17T02:02:36Z")

</div>

Right now, I’m just trying to move some very sceptical folk off of JavaCall.jl + JDBC.jl to ODBC.jl, but still on v0.6.4, so that’s OK for the near future.
