This is probably a data-related problem but it's impossible to be sure without the code used to execute the query, or sample data. This answer is only an educated guess.
The first query performs an inner join between 4 tables, guest,program,host and episode. It is the equivalent of the following syntax which uses INNER JOIN and in fact, the original join format is now consider deprecated:
from
guest
inner join episode on guest.name=episode.guestnamefk
inner join host on host.name=episode.hostnamefk,
inner join program on program.name=episode.programnamefk
where
guest.name Like '%someFragment%';
This query will return results only if there are guests whose name contains someFragment somewhere in them ONLY if all conditions match, ie the guestnamefk is exactly equal to name, hostnamefk is exactly equal to host etc. If there is even one character different, even a space in the beginning or end, the matching fails. Typically, matching doesn't take letter case into account and John matches JOHN, but not John.
Using names or any information that has business meaning as a key is a bad idea. If name is John, guestnamefk must also be John. If the first name is renamed, the change must cascade to all related records.
For this reason, surrogate keys are almost always used as primary keys, eg an integer field named GuestId. This allows you to change the guest name in the guest table only, without having to affect anything else.
If you want to retrieve guests even when there aren't matching episodes, hosts or programs, you need to use a LEFT JOIN, which returns all records from the left side and any matching records from the right, returning NULL if there is no match on the right. Using a LEFT JOIN is a very good way to debug failing INNER JOIN queries.
from
guest
left outer join episode on guest.name=episode.guestnamefk
left outer host on host.name=episode.hostnamefk,
left outer program on program.name=episode.programnamefk
where
guest.name Like '%someFragment%';
If there is only one matching record across all tables though, only that one record will be returned.
You could try to check for all mismatches with a FULL OUTER JOIN. This will return null for non-matching records on the left and right. This will reveal whether, eg guestnamefk contains both a John and a John entry. The following query will return only the records that have some missing link:
from
guest
full outer join episode on guest.name=episode.guestnamefk
full outer host on host.name=episode.hostnamefk,
full outer program on program.name=episode.programnamefk
where
guest.name is null
or episode.guestnamefk is null
or program.name is null
or host.name is null;
Another possibility is that the query is executed incorrectly. If, for example ExecuteReader() is used, the call to Read() may be missing. A missing brace could result in execution skipping over the call to Read. A call to break,continueorreturn` could terminate the loop prematurely. Again, it's impossible to guess without looking at the code.
AND guest.name Like ...where clause and run the query without it, do you get the same number of rows ?'). You're also misunderstanding the main purpose of this site, it is not a forum to help OP.