Quote:
quote:Originally posted by spinout
Yes that worked. However it only returned all the fields from the child table that matched the top row ID column in the primary table. I need to be able to return multiple columns in the top row of the primary table rather than just the ID field.
I tried doing this by modifying the query but I got an error message saying "Only one expression can be specified in the select list when the subquery is not introduced with EXISTS."
|
How about this
SELECT *
FROM child_table, parent_table
WHERE foreign_key=primary_key AND primary_key=(SELECT top 1 primary_key FROM parent_table);
A modified version of my suggestion.....
but the performance isn't as fast as before