Wednesday, March 21, 2012

Naive question on UDFs

Hi,
Is it a requirement of SQL server, that UDFs return values?
kdReturn is a non optional keyword so you have to give back something, but you
are forced to use it anyway :-)
So returning 0 and not using would be fine.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"kd" <kd@.discussions.microsoft.com> schrieb im Newsbeitrag
news:DC0C8797-CFEE-4B64-807E-EA22CF731A37@.microsoft.com...
> Hi,
> Is it a requirement of SQL server, that UDFs return values?
> kd|||kd
Are you talking about that you cannot pefrorm UPDATE/DELETE/INSERT to
underlaying tables?
"kd" <kd@.discussions.microsoft.com> wrote in message
news:DC0C8797-CFEE-4B64-807E-EA22CF731A37@.microsoft.com...
> Hi,
> Is it a requirement of SQL server, that UDFs return values?
> kd|||Since a UDF cannot perform Inserts Updates or Deletes, it would be pointles
s
to call a function that did a bunch of processing internally, that had no
external effect, and did not return anything to the caller. What would be
the point?
Having said that, I don;t think that SQL Server mandates that you actually
return anything...
"kd" wrote:

> Hi,
> Is it a requirement of SQL server, that UDFs return values?
> kd

No comments:

Post a Comment