MSSQL Forums

MSSQL Forums > Archive > microsoft.public.sqlserver.programming > Only functions and extended stored procedures can be executed from within a function.

Reply
Thread Tools Display Modes

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

 
 
Sotiris karanasios
Guest
Posts: n/a

 
      04-16-2004
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!
 
Reply With Quote
 
 
 
 
Raymond Lewallen
Guest
Posts: n/a

 
      04-16-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extended stored procedures failues - only under sql server login Pedja microsoft.public.sqlserver.programming 8 05-20-2009 05:11 AM
Can a DTS Package be executed from within a Stored Proc? Hurme microsoft.public.sqlserver.dts 0 02-12-2009 03:31 PM
Extended Stored Procedures Can be Executed guruprasathb@gmail.com microsoft.public.sqlserver.programming 1 12-26-2007 01:26 PM
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored procedure is executed by sql server 2005 then it creates 10 DR microsoft.public.sqlserver.clr 2 10-26-2007 12:21 PM
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored procedure is executed by sql server 2005 then it creates 10 DR microsoft.public.sqlserver.server 0 10-25-2007 03:37 AM