MYSQL If empty string then N/A

Hello I’m trying to display N/A if return string in MYSQL is empty but sadly my attempt has been unsuccessful for days i can only show N/A if return string is Null but i dont know how to display N/A if return string is empty. Can somebody teach me how? or just point me to right direction? i find this in stackoverflow https://stackoverflow.com/questions/35550013/mysql-replace-null-or-empty-with-0000 but sadly I’m having trouble implementing this query to my query

SELECT COALESCE(GROUP_CONCAT(DISTINCT t.group_name SEPARATOR ', '), 'N/A') as 'Group Name'

FROM types_of_learners t JOIN

blh_location blhloc

ON t.blh_location_userid=blhloc.blh_id

WHERE t.date_submitted >= date_sub(curdate(), interval 0 day)

AND t.tol='Associations'

AND blhloc.blh_barangay='Bagumbayan'

submitted by /u/GORILLA_BYTE
[link] [comments]


Go to Source of this post
Author Of this post: /u/GORILLA_BYTE
Title Of post: MYSQL If empty string then N/A
Author Link: {authorlink}