As the title says, I just want an output if the if is matched, if it’s not matched then I don’t want any output.
I currently have this, but it gives an error obviously
...rFormat=IF(ISNULL(rFormat), VALUES(rFormat),UNCHANGED)…
I looked around http://dev.mysql.com/doc/refman/5.4/en/control-flow-functions.html but didn’t really find out how to do it.
This question is kinda related to http://stackoverflow.com/questions/1837912/only-update-the-mysql-field-if-the-field-contains-null-or-0
This is used in context of: (as seen in the above URL)
………
ON DUPLICATE KEY UPDATE
rFormat=VALUES(rFormat),
rFiles=IF(ISNULL(rFiles), VALUES(rFiles), VALUES(rSizeMB)),
rText=VALUES(rText);