Link to home
Start Free TrialLog in
Avatar of tcianflone
tcianfloneFlag for United States of America

asked on

T-SQL Query: Select a row in one table based on data in another table

I have two related tables, template and templine. They both have a template field that contains the template name and that's how they relate to each other. I need to select records in templine based on a field that appears only in template. Something like this:

select * from templine where template.type='M'

I don't know how to express template.type (which is supposed to find the type field in the template table) properly so that the query will run. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Egilas76
Egilas76
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tcianflone

ASKER

Thanks!