title: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.Splitfn", or the name is ambiguous
body: <p>I've used the following split function:</p>
  <pre><code>CREATE FUNCTION dbo.Splitfn(@String varchar(8000), @Delimiter char(1))       
  returns @temptable TABLE (items varchar(8000))       
   as       
  begin       
  declare @idx int       
  declare @slice varchar(8000)       
    
  select @idx = 1       
      if len(@String)&lt;1 or @String is null  return       
    
  while @idx!= 0       
  begin       
      set @idx = charindex(@Delimiter,@String)       
      if @idx!=0       
          set @slice = left(@String,@idx - 1)       
      else       
          set @slice = @String       
        
      if(len(@slice)&gt;0)  
          insert into @temptable(Items) values(@slice)       
  
      set @String = right(@String,len(@String) - @idx)       
      if len(@String) = 0 break       
  end   
  return      
  
  end  
  </code></pre>
  <p>and i used this function in a query and it was executed</p>
  <pre><code>ALTER PROCEDURE [dbo].[Employees_Delete] 
  -- Add the parameters for the stored procedure here
  @Id varchar(50)
  AS
  BEGIN
  -- SET NOCOUNT ON added to prevent extra result sets from
  -- interfering with SELECT statements.
  SET NOCOUNT ON;
  
  -- Insert statements for procedure here
  
   if exists( select Emp_Id from Employee where Emp_Id=dbo.Splitfn(@Id,','))
  begin
      update Employee set Is_Deleted=1 where Emp_Id=dbo.Splitfn(@Id,',')
      select 'deleted' as message
  end 
  END
  </code></pre>
  <p>but when i excute my store procedure giving values say (1,2) i got the error</p>
  <pre><code>Cannot find either column &quot;dbo&quot; or the user-defined 
  function or aggregate &quot;dbo.Splitfn&quot;, or the name is ambiguous.
  </code></pre>
  <p>I've checked my tablevalued functions the function 'splitfn' was there but I don't know what is going wrong? Any suggestions..</p>