# Joining two tables based on date ranges

**URL:** <https://forum.knime.com/t/joining-two-tables-based-on-date-ranges/37805>\
**Category:** KNIME Analytics Platform\
**Created:** [December 3, 2021, 7:57am UTC](https://forum.knime.com/t/joining-two-tables-based-on-date-ranges/37805 "2021-12-03T07:57:29Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [December 3, 2021, 6:30pm UTC](https://forum.knime.com/t/joining-two-tables-based-on-date-ranges/37805/7 "2021-12-03T18:30:53Z")

</div>

@ViTLe indeed on option would be to use a H2 database to realise a BETWEEN join.

> [@Efficient way of doing a JOIN ... WHERE ...](https://forum.knime.com/t/efficient-way-of-doing-a-join-where/27474/3):
>
> Well, not a particularly sophisticated idea but you could try and use a local [H2 database](https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_h2_database/m_001_h2_db) to join two datasets by time ranges. Depending on the power of your machine and other factors that might work. I tried it with files of different sizes and at least it gives you a result. Until there is a solution in KNIME you could explore further the possibilities of using SQL to make the join more efficient. I took from this older entry: There might be some special limitations when workin…

---

_[View the full topic](https://forum.knime.com/t/joining-two-tables-based-on-date-ranges/37805)._
