Hey
I am using a trigger, if the trigger returns emtpy I want it to keep the data it already has.
This is my trigger:
BEFORE INSERT
SET NEW.calling_num = (SELECT users_name FROM cdr_phone_system_data WHERE extension_number = NEW.calling_num);
How can I check if the return is blank? The idea is so we either match the number with a name or we show the number. It should never be blank.
Many Thanks
Chris.