SQL |
SELECT e.expertID
, e.Photo
, e.Fname
, e.Lname
, e.middle as mname
, dbo.titleCleaner(e.Title) as title
, e.UniversityName
, e.mainURL
, dbo.titleCleaner(e.ExpHomeDept) as ExpHomeDept
, e.isSpeaker
, e.isExpert
, e.ORCID
, e.GoogleScholarLink
,(select count(*)
from expVideos ev
where ev.expertID = e.expertID
) as numVideos
, e.Phone
, e.Fax
, e.preferredEmail
, e.URL
, e.Address1
, e.Address2
, e.Address3
, e.Address4
, e.City
, e.State
, e.Zip
, e.Biography
, dbo.titleCleaner(e.CollegeSchool) as CollegeSchool
, e.publications
, isFAMUFSUCOE =
case
when exists (select *
from experts_systemTags eerk
where eerk.fkTagID = ?
and eerk.fkExpertID = e.expertID
) then 1
else 0
end
FROM expertsUpdated e
WHERE e.expertID = ?
and e.inViewFilteredExperts = 1 |