I have a subquery which can return multiple results if a customer has duplicated sales codes.
I currently LIMIT 1
to just return the most recent but ... Is there away to return NULL or "DUPLICATE" if RESULT > 1
?
I am using this field to overwrite a field which already has a default - therefore, I would just prefer to use the default or raise an alert for rectification.