I ned to be able to selcet data on the following
if a user has sub_agents attached to the I need to pull back only records where there is a hit on the subagent table however if the User has no agents attached then I ned to be able to select all records that are relvent to the user;
Normally I would use either either sub query or a join but the requirement that all returned if no agents are attached is stumping me,
Can anybody help?
if a user has sub_agents attached to the I need to pull back only records where there is a hit on the subagent table however if the User has no agents attached then I ned to be able to select all records that are relvent to the user;
Normally I would use either either sub query or a join but the requirement that all returned if no agents are attached is stumping me,
Can anybody help?