Last active
August 4, 2021 06:52
-
-
Save sdrwtf/acdd6b3a5fff0a639a39bc00149fa6b3 to your computer and use it in GitHub Desktop.
Select all active articles in a Shopware 5.x database which have unsupported special characters in the ordernumber.
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 all active articles in a Shopware 5.x database | |
which have unsupported special characters in the ordernumber. | |
(Supported special characters are: . - _) | |
*/ | |
SELECT | |
sad.ordernumber, | |
sa.name AS 'ArticleName', | |
sa.active, | |
sas.name AS 'SupplierName' | |
FROM | |
s_articles sa | |
LEFT JOIN | |
s_articles_details sad | |
ON | |
sa.id = sad.articleID | |
LEFT JOIN | |
s_articles_supplier sas | |
ON | |
sa.supplierID = sas.id | |
WHERE | |
sa.active = 1 | |
AND | |
sad.ordernumber REGEXP '[^a-zA-Z0-9\-\_\.]'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment