dreamer610
MIS
I've been struggling with this for a day or so. I have a subquery in a query which pulls and displays the name of an organization from one table (tblOrgs) based on the symbol in another table (People). The problem is, that some of the symbols in People do not have corresponding entries in tblOrgs. In these situations I'd like to just display the symbol from People. Right now when a match is not found it just returns as empty. I'm sure there has to be a way to do a Case or If then else statement but I do not know the syntax. My code is below. Any help that you can offer would be greatly appreciate, thank you!
select *, (select tblOrgs.name from tblOrgs where tblOrgs.symbol = People.masterSymbol) as theName,
from People
select *, (select tblOrgs.name from tblOrgs where tblOrgs.symbol = People.masterSymbol) as theName,
from People