Created
May 9, 2017 17:27
-
-
Save rasy-js/328b1dccd14617531bfbce4efa09d279 to your computer and use it in GitHub Desktop.
sql query with regexp instead IN and LIKE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
`w`.worker, `w`.time_with, `w`.time_to, `w`.foreman, `w`.object | |
FROM `workers_days` AS `w` | |
WHERE ( `worker` = 'Петров Игорь Васильвевич' ) | |
AND ( `year` = '2017' ) | |
AND ( `month` = '5' ) | |
AND ( `day` = '1' ) | |
AND ( `Пирожков_сорт` REGEXP '^4$|^4.1$' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment