Only functions and extended stored procedures can be executed from within a function.

Discussion in 'microsoft.public.sqlserver.programming' started by Sotiris karanasios, Apr 16, 2004.

  1. Hi there Gurus,

    I need to write a the follwing udf
    ToShip( @Model, @Color, @MaxQuantity)

    this needs to be a UDF since it will be called in a select statement and
    will be used in the whereby clause also.

    I am in the stop where

    If @MaxQuantity <= Quantity
    Begin
    here should go the update code
    End

    I get the error message though

    Only functions and extended stored procedures can be executed from
    within a function.

    Is there anyone who can help me out :)
    ty all in advance
    Sotiris/Greece

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Sotiris karanasios, Apr 16, 2004
    #1
    1. Advertisements

  2. Sotris,

    Can you supply to code to the entire function? There could be numerous
    things going wrong, but without the code we can't tell.

    Raymond Lewallen

    "Sotiris karanasios" <> wrote in message
    news:...
    > Hi there Gurus,
    >
    > I need to write a the follwing udf
    > ToShip( @Model, @Color, @MaxQuantity)
    >
    > this needs to be a UDF since it will be called in a select statement and
    > will be used in the whereby clause also.
    >
    > I am in the stop where
    >
    > If @MaxQuantity <= Quantity
    > Begin
    > here should go the update code
    > End
    >
    > I get the error message though
    >
    > Only functions and extended stored procedures can be executed from
    > within a function.
    >
    > Is there anyone who can help me out :)
    > ty all in advance
    > Sotiris/Greece
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Raymond Lewallen, Apr 16, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.