Accessing a user-defined function in a stored procedure

  • Hi guys

    Is it possible to access a function I have written in a stored procedure?

    For example, say I had written a function called dbo.fn_bookRef can I then, in a SP, SET @MyBookRef = dbo.fn_bookRef(@ThisRef) where ThisRef is a parameter?

    many thanks

    Robsa

  • I have to ask - have you tried this, prior to posting the question?

    Give it a go and let us know if you have any difficulties with it.

  • Yes.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Ah, yes, sorry guys! It actually worked fine. It was just that in the SQL Management Studio it was telling me that it was undefined. Despite this, it ran perfectly!

    Robsa

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply