Skip to content

Instantly share code, notes, and snippets.

@pvankouteren
Created January 25, 2017 10:15
Show Gist options
  • Save pvankouteren/e607c53fc43b4d3fbe0a5632af633199 to your computer and use it in GitHub Desktop.
Save pvankouteren/e607c53fc43b4d3fbe0a5632af633199 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 = '0000-00-00') 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