Friday, February 17, 2012

Default Template for User Defined Function

How can I restore the original User Defined Function Template? I made
an error and saved one of my UDFs as a template but would like the
original template restored?

TIAThanks. SQL User Defined Functions only allow you to save one
template. Do you know which one is the default installed by SQL Server
2000?|||(jhmosow@.gmail.com) writes:
> Thanks. SQL User Defined Functions only allow you to save one
> template. Do you know which one is the default installed by SQL Server
> 2000?

Not sure that I understand. I found three templates on my machine, which
I assume are the default templates. And it seems reasonable to me that
there are three templates, as there are three types of UDF. Does not
seem like a good idea to one have one template for all three.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||On 6 Jan 2006 05:54:42 -0800, jhmosow@.gmail.com wrote:

>Thanks. SQL User Defined Functions only allow you to save one
>template. Do you know which one is the default installed by SQL Server
>2000?

Hi jhmosow,

This is not correct. You can store all three (or even more, if you
desire).

The location where templates for user-defined fuinctions are stored
(asssuming that SQL Server is installed in the default directory) is
(warning, path may wrap)

C:\Program Files\Microsoft SQL Server\80\Tools\Templates\SQL Query
Analyzer\Create Function\*.tql

The "...\Create Function\" is a folder; the three .tql files Erland sent
you should be stored there.

--
Hugo Kornelis, SQL Server MVP

No comments:

Post a Comment