Skip to content

Instantly share code, notes, and snippets.

@pvankouteren
Created January 25, 2017 10:15
Show Gist options
  • Save pvankouteren/7cf5cd85a6351853524b697a81738133 to your computer and use it in GitHub Desktop.
Save pvankouteren/7cf5cd85a6351853524b697a81738133 to your computer and use it in GitHub Desktop.
SELECT contract.* FROM `contract` WHERE contract.ORDER_ID='1' AND ((contract.CONTRACT_TO > '2011-06-07' OR contract.CONTRACT_TO = '-0001-11-30') AND contract.CONTRACT_FROM <= '2011-06-07') ORDER BY contract.CONTRACT_FROM ASC,contract.CONTRACT_ID ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment