Hi,
Can you help me with joing three tables please?
I am doing freetext in sql server database.
I just want to list everything with this search word in it.
Say I have these three tables.
project(projectid,projectn
ame)
projectpeople(projectid,pe
opleid)
people(people,lastname,fir
stname)
I have thse two queries from each table but I am not sure how I should merge two result tables.
select projectid,projectname
from project inner join projectpeople on project.projectid = projectpeople
where freetext(projectname,@sear
chword)
select peopleid,lastname,firstnam
e
from people inner join people.id = projectpeople.peopleid
where freetext(lastname,@searchw
ord) or freetext(firstname,@search
word)
I just want to list these two results in one table.
projectid,projectname,last
name,first
name,peopl
eid
Do I even need to use the linking table(junction table) in this case?
Thanks much.
Start Free Trial