I've got a query that looks a bit like this:
select
records.id,
contacts.name + ' (' + contacts.organization + ')' as contact,
from records
left join contacts on records.contact = contacts.contactid
Problem is - contacts.organization
is frequently empty, and I get contacts like "John Smith ()". Is there a way to only concatenate the organization if it's non-empty?