Skip to main content
Question

I am trying to extract records from one table based on a series of date ranges in another table. I want all the records from table A, that fall between date ranges from table B. Each table B row has a start date and end date.

  • March 17, 2022
  • 4 replies
  • 46 views

zanzibarjack
Contributor
Forum|alt.badge.img
I am trying to extract records from one table based on a series of date ranges in another table. I want all the records from table A, that fall between date ranges from table B. Each table B row has a start date and end date.

4 replies

Forum|alt.badge.img+2
  • 1891 replies
  • March 17, 2022

@zanzibarjack​ If the data is in a database then you can use SQLExecutor to run a SQL BETWEEN query on the two tables. If the data is form Excel or CSV then you can do the same query, but using InlineQuerier


zanzibarjack
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 2 replies
  • March 17, 2022

@zanzibarjack​ If the data is in a database then you can use SQLExecutor to run a SQL BETWEEN query on the two tables. If the data is form Excel or CSV then you can do the same query, but using InlineQuerier

Thank you or your response. I hoping to automate the process instead of manually typing in each date range. The date ranges are coming in from a separate table than the records I'm trying to filter.


hkingsbury
Celebrity
Forum|alt.badge.img+63
  • Celebrity
  • 1625 replies
  • March 17, 2022

Thank you or your response. I hoping to automate the process instead of manually typing in each date range. The date ranges are coming in from a separate table than the records I'm trying to filter.

You'd make one call to table containing the dates, then use those vlaues in an AttrbiuteCreator to create the WHERE clause and pass that into an SQLExecutor or FeatureReader


Forum|alt.badge.img+2
  • 1891 replies
  • March 18, 2022

@zanzibarjack​ There's an InlineQuerier SQL example by @Takashi Iijima​ here