I am executing a DTS package that is designed to copy objects from DB to DB. I am receiving an error:
Step Error Source: Microsoft SQL-DMO (ODBC SQLState: 42S02)
Step Error Description:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.fnPrimaryDivisionOfUser'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not use view or function 'vwAllUserRoles' because of binding errors.
The view references the function, but not vice versa. Any clues why I'm getting a binding error when the function is simply:
Create Function dbo.fnPrimaryDivisionOfUser(@UserID uniqueidentifier)
Returns char(3)
as
begin
declare @Division char(3)
select top 1 @Division = Division
from UserDivisions
where UserID = @userid
order by CreatedDate
return @Division
end
Thanks. RH