• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

UDF can't make permanent changes to server environments while SP's can change some of them - SQL Server 2005 / 2008

Hi,

Can you please explain me in simple terms and examples :

UDF can't make permanent changes to server environments while SP's can change some of them - SQL Server 2005 / 2008

Thanks
0
milani_lucie
Asked:
milani_lucie
1 Solution
 
nmcdermaidCommented:
what's the actual question/issue?
0
 
milani_lucieAuthor Commented:
This is one of the difference  between UDF and SP
0
 
reb73Commented:
Simply put, it means that you cannot alter server settings or configurations within a UDF, while some element of this is permissible within a stored procedures..

For e.g. you cannot have the following statements within a UDF (SET keyword in UDFs can only be used to assign values to variables), but this is allowed within a stored procedure..

SET DATEFORMAT DMY

The statement above changes the way literal date values are interpreted by the server.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now