Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
join using spaces and registered trademark symbol: proof of concept
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), ' ', ''),'®')
@jsauve

This comment has been minimized.

Copy link
Owner Author

@jsauve jsauve commented Nov 6, 2014

Correctly returns a single row when there is an existing row in the dbo.productOwners table with the productOwner_name value set to "BFGoodrich®"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment