• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 60
  • Last Modified:

between vs IN

Good afternoon, could give me an example where display is better to use BETWEEN and we should not use IN
0
enrique_aeo
Asked:
enrique_aeo
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:
They are actually two different things.

If you all the dates between January 1 and today, use

  BETWEEN '01/01/2016' and '08/06/2016'

If you want just the first of the month in that range, use

  IN ('01/02/2016', '02/01/2016', '03/01/2016', ... , '08/01/2016')


Good Luck!
Kent
0
 
enrique_aeoAuthor Commented:
ok
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now