nope. your created udf is table valued udf so you cant use udf like this. it should be like select distinct ss.SectionID, ss.SectionStartDate, f.instructors as email, S.courseid,S.sectionnumber from Sp.SectionSemester ss inner join SP.Section S on ss.SectionID=S.sectionID cross apply dbo.fn_InstructorsEmailsbySectionID_inline(ss.SectionID) fwhere S.sectionstatus != 2 and s.Deleted=0 and ss.SemesterID=@semesterid and s.ParentSection=0
b/w is SP name of schema?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/