Another solution but this is very slow compare the below query.
select DISTINCT u.Id from Users u
inner join Certification c on u.ID =
c.AId inner join ApplicantDetails ad
on u.ID=ad.AId inner join
EducationalBackground eb on
u.ID=eb.AId inner join
EmploymentDetails ed on u.Id=ed.AId
inner join Expertise e on u.Id=e.AId
inner join GeographicalExperience ge
on u.Id=ge.AId inner join [Language] l
on u.Id=l.AId inner join
ProjectDetails pd on u.Id=pd.AId
inner join [References] r on
u.Id=r.AId inner join Training t on
u.Id=t.AId left join FreeTexttable
(Users,
(AlternativeEmail,Email,Firstname,Lastname,Middlename),
'xandrick') as uf on uf.[KEY] =
u.id left join FreeTexttable
(ApplicantDetails,
(Address1,Address2,City,Province,StateorRegion),
'xandrick') as adf on adf.[KEY] =
ad.id left join FreeTexttable
(Certification,
(Certification,School), 'xandrick')
as cf on cf.[KEY] = c.id left join
FreeTexttable (EducationalBackground,
(fieldofStudy,other,School),
'xandrick') as ebf on ebf.[KEY] =
eb.id left join FreeTexttable
(EmploymentDetails,
(Address1,Address2,City,CompanyName,DescriptionofDuties,Position,Province,TypeofBusiness),
'xandrick') as edf on edf.[KEY] =
ed.id left join FreeTexttable
(Expertise, (Expertise), 'xandrick')
as ef on ef.[KEY] = e.id left join
FreeTexttable (GeographicalExperience,
([Description]), 'xandrick') as gef
on gef.[KEY] = ge.id left join
FreeTexttable ([Language],
([Language]), 'xandrick') as lf on
lf.[KEY] = l.id left join
FreeTexttable (ProjectDetails,
(Address1,Address2,City,ProjectDescription,Projectname,Projectrole,Province,ServiceRendered,StateorRegion),
'xandrick') as pdf on pdf.[KEY] =
pd.id left join FreeTexttable
([References],
(ContactDetails,CurrentPosition,Name,Organization),
'xandrick') as rf on rf.[KEY] =
r.id left join FreeTexttable
(Training, (School,Training),
'xandrick') as tf on tf.[KEY] =
t.id
where uf.[KEY] is not null OR
adf.[KEY] is not null OR cf.[KEY] is
not null OR ebf.[KEY] is not null
OR edf.[KEY] is not null OR ef.[KEY]
is not null OR gef.[KEY] is not null
OR lf.[KEY] is not null OR pdf.[KEY]
is not null OR rf.[KEY] is not null
OR tf.[KEY] is not null
當您發佈代碼和/或表格結構時,**請**突出顯示這些行並按下編輯器工具欄上的「代碼」按鈕(101 010)。這將很好地格式化和語法高亮這些代碼片段,讓你的文章更容易閱讀和理解!並嘗試**不**以使用TABS - 將它們轉換爲空格! – 2010-06-07 09:43:56