I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:
Invalid object name 'dbo.fn_NewSplit'.
I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.
Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.
Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.
Can you post the function code as well as your TSQL calling the function?
|||
jmhooten:
I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:
Invalid object name 'dbo.fn_NewSplit'.
I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.
Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.
Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.
Well, thank you Sql Server developers, my issue wasn't that the object name wasn't valid, it was that I was not calling it correctly (I should have called the function within a SELECT statement in my case) the last question lead me to the answer.
No comments:
Post a Comment