clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1716880 fiddles created (23884 in the last week).

CREATE TABLE my_error (wrong VARCHAR(50));
 hidden batch(es)


INSERT INTO my_error VALUES ('Addiction Advice Services Ltd.'); INSERT INTO my_error VALUES ('AIR BP_and-mistake'); INSERT INTO my_error VALUES ('AIR New Zealand Airlines');
3 rows affected
 hidden batch(es)


SELECT * FROM my_error ORDER BY wrong;
wrong
Addiction Advice Services Ltd.
AIR BP_and-mistake
AIR New Zealand Airlines
 hidden batch(es)


WITH my_cte AS ( SELECT CASE WHEN UPPER(wrong) LIKE 'ADDICTION ADVICE%' THEN 'ADDICTION ADVICE' WHEN UPPER(wrong) LIKE 'AIR BP%' THEN 'AIR BP' WHEN UPPER(wrong) LIKE 'AIR NEW Z%' THEN 'AIR NEW ZEALAND' ELSE '****ERROR****' -- you may or may not need this! -- If converting every record, then yes, if not, then no! -- Errors should stand out on browsing and it's easy to search for! END AS wrong FROM my_error ) SELECT * FROM my_cte;
wrong
ADDICTION ADVICE
AIR BP
AIR NEW ZEALAND
 hidden batch(es)