----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: MysticAspen Message 1 in Discussion Hi I have this query select FacilityID,count(*)as TotalStrength,fn_employeesEnrolled(FacilityID) from bd_EmployeeDetail Where FacilityID in (select FacilityID from bd_FacilitySubscribedList Where EmployerID=111 ) Group by FacilityID Function is defined below: CREATE FUNCTION fn_employeesEnrolled (@FacilityID int) RETURNS int AS BEGIN DECLARE @RecordCount int SET @RecordCount=0 select @RecordCount= count(*) from bd_PlanEnrollmentData Where EmployeeID in (select UID from bd_EmployeeDetail Where FacilityID [EMAIL PROTECTED] and PlanHistoryStatus='A') Group By EmployeeID RETURN(@RecordCount) END When i run the query i get error Server: Msg 195, Level 15, State 10, Line 1 'fn_employeesEnrolled' is not a recognized function name. Why so ? TIA Srivats ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
