I think this should be easy, but it\'s evading me. I\'ve got a many-to-many relationship between Accounts and Account Groups. An Account can be in zero or more Groups, so I\
SELECT act.acctid AS AcctId, bankName, acctNumber, Balance,
NVL(jag.gid, '-') AS GroupID, NVL(gp.groupname, '-') AS GroupName
FROM accounts act
LEFT OUTER JOIN JointAccountGroups jag ON (act.id = jag.aid)
LEFT OUTER JOIN AccounGroups gp ON (jag.gid = gp.id)
NVL is a function that means "if first argument is null, return the second argument; otherwise, return first argument". NVL happens to be how Oracle do it -- all DBs have something like that, but it doesn't have a standard name; look up how Access does it.