In my table I have a few people with a few names written with a comma or the word 'and' in between, and empty cells as well (for example: first_name ---> 'Scarlet, Charlie' - I dont want this row to show at all). I want to present the correct rows only, without abnormality. I wrote the following query but got the 1292 error (Truncated Incorrect Double Value).
CREATE TABLE t3 as
(
SELECT t1.*, t2.first_name, t2.last_name
FROM t1
LEFT JOIN t2
ON (t1.id = t2.id)
WHERE t1.first_name NOT LIKE '% and %' OR '%,%' OR ' '
);
what did I do wrong, and how can I fix it?