Hi, here is the sample code...
---------------------------------
if exists (select * from sysobjects where id = object_id('dbo.getStaffNamesForPersonalReferences') and sysstat & 0xf = 0)
drop function dbo.getStaffNamesForPersonalReferences
GO
CREATE FUNCTION dbo.getStaffNamesForPersonalReferences(@PERSONAL_REFERENCES varchar(2000))
RETURNS...