Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 64
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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