Re: Computed columns in temp tables

From: Steven Yampolsky (syampolsky_at_eagleinvsys.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 10:27:13 -0400

How can I create a function in tempdb while inside a stored procedure? I
don't think I can do that.

Lets assume I can use sp_executesql to create the function inside a SP. What
will be a lifespan of it? Will it get dropped once the session is closed?
will it be accessible from other sessions? Will there be a name conflict
when two sessions will try and execute the same SP?

The more I get into it, the more questions I get. Hopefully I'll come out
with good knowledge! :)

Steve

"Jacco Schalkwijk" <jacco.please.reply@to.newsgroups.mvps.org.invalid> wrote
in message news:uCXtqSrWEHA.2520@TK2MSFTNGP12.phx.gbl...
> As Vyas pointed out, the issue is that you have to create the function in
> tempdb. I think he is right in suggesting that you can't use UDFs that
> reside in a different database in the definition of a table.
>



Relevant Pages

  • Re: Computed columns in temp tables
    ... How can I create a function in tempdb while inside a stored procedure? ... when two sessions will try and execute the same SP? ... I think he is right in suggesting that you can't use UDFs that ...
    (microsoft.public.sqlserver.programming)
  • Re: Computed columns in temp tables
    ... How can I create a function in tempdb while inside a stored procedure? ... when two sessions will try and execute the same SP? ... I think he is right in suggesting that you can't use UDFs that ...
    (microsoft.public.sqlserver.server)
  • Re: Computed columns in temp tables
    ... Steve ... > Create a permanent function in tempdb, ... > RETURNS int ... >> when two sessions will try and execute the same SP? ...
    (microsoft.public.sqlserver.datamining)
  • Re: Computed columns in temp tables
    ... Steve ... > Create a permanent function in tempdb, ... > RETURNS int ... >> when two sessions will try and execute the same SP? ...
    (microsoft.public.sqlserver.server)
  • Re: Computed columns in temp tables
    ... Steve ... > Create a permanent function in tempdb, ... > RETURNS int ... >> when two sessions will try and execute the same SP? ...
    (microsoft.public.sqlserver.programming)

Loading