Created
November 6, 2014 19:03
-
-
Save jsauve/d6381ead501a31b85613 to your computer and use it in GitHub Desktop.
join using spaces and registered trademark symbol: proof of concept
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
DECLARE @brands TABLE (brand NVARCHAR(50)); | |
INSERT INTO @brands (brand) | |
VALUES ('BF Goodrich'); | |
SELECT * | |
FROM dbo.productOwners | |
INNER JOIN @brands ON | |
REPLACE(LOWER(brand), ' ', '') = REPLACE(LOWER(productOwner_name), ' ', '') OR | |
REPLACE(LOWER(productOwner_name), ' ', '') = CONCAT(REPLACE(LOWER(brand), ' ', ''),'®') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Correctly returns a single row when there is an existing row in the dbo.productOwners table with the productOwner_name value set to "BFGoodrich®"