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

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.
Similar Threads
  1. rob
    Replies:
    1
    Views:
    119
    Carlo Capelli
    Nov 27, 2006
  2. Hurme

    Can a DTS Package be executed from within a Stored Proc?

    Hurme, Feb 12, 2009, in forum: microsoft.public.sqlserver.dts
    Replies:
    0
    Views:
    52
    Hurme
    Feb 12, 2009
  3. Leonid

    Can Extended stored procedures return metadata (2)

    Leonid, Sep 17, 2003, in forum: microsoft.public.sqlserver.programming
    Replies:
    1
    Views:
    51
    Gert E.R. Drapers
    Sep 17, 2003
  4. Scott McNair

    Functions within functions

    Scott McNair, Jan 11, 2005, in forum: microsoft.public.sqlserver.programming
    Replies:
    11
    Views:
    160
    Adam Machanic
    Jan 12, 2005
  5. Extended Stored Procedures Can be Executed

    , Dec 26, 2007, in forum: microsoft.public.sqlserver.programming
    Replies:
    1
    Views:
    55
    Erland Sommarskog
    Dec 26, 2007
  6. Pedja

    Extended stored procedures failues - only under sql server login

    Pedja, May 13, 2009, in forum: microsoft.public.sqlserver.programming
    Replies:
    8
    Views:
    65
    Tibor Karaszi
    May 20, 2009
  7. Jeroen De Brabander

    Where can I put code that can be executed when the report opens ?

    Jeroen De Brabander, May 24, 2005, in forum: microsoft.public.sqlserver.reportingsvcs
    Replies:
    1
    Views:
    84
    Bruce L-C [MVP]
    May 24, 2005
  8. jack

    Executing an extended stored proc from within a function!

    jack, Jun 17, 2008, in forum: microsoft.public.sqlserver.server
    Replies:
    3
    Views:
    43
Loading...