stored proc in a function

  • Guys,

    Can a stored proc be executed in a function.

    create function getval(@variable, varchar(20))

    return as int

    begin

    exec storedproc @variable

    end

    ----

    select getval('tom')

    Is this possible??

    Thanks 

  • yes

  • Have you tried it?  Only functions and extened stored procedures can be executed from within a function.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • your right, I was thinking function in a function, sorry about the bad info

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

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