sql server - get name from another table while using sub query -


i have query this:

select      f_exhibitioncode,     f_exhibitorcode       t_exhibitorlocation       f_exhibitorcode in (         select              f_exhibitor_code                       t_exhibitor                       f_exhibitor_name  '%''%') 

i have 2 more tables , 1 *t_exhibition* , 1 "t_exhibitor, f_exhibiton name coming form t_exhibition , f_exhibitorcode coming t_exhibitor ,
final result need this: f_exhibitonnaem, f_exhibition code,f_exibitorname,f exhibitor code.

assuming understand tables structure, suggest along these lines:

select el.f_exhibitioncode, el.f_exhibitorcode, e.f_exhibiton_name t_exhibitorlocation el inner join t_exhibitor e on(el.f_exhibitorcode = e.f_exhibitorcode) e.f_exhibitor_name '%''%' 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -