<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; User Defined Functions (UDF) Limitations</title>
	<atom:link href="http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:29:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Azhar Iqbal</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-229856</link>
		<dc:creator><![CDATA[Azhar Iqbal]]></dc:creator>
		<pubDate>Mon, 02 Jan 2012 04:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-229856</guid>
		<description><![CDATA[Can I use union in Table value function.]]></description>
		<content:encoded><![CDATA[<p>Can I use union in Table value function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose Luiz</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-203721</link>
		<dc:creator><![CDATA[Jose Luiz]]></dc:creator>
		<pubDate>Thu, 24 Nov 2011 14:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-203721</guid>
		<description><![CDATA[Hi, JoeJay,

The solution for your problem is :

CREATE TABLE Description_Sales
(
Sales_Id VARCHAR(3),
[Description] VARCHAR(15)
)


INSERT INTO Sales VALUES (1,&#039;Good&#039;);
INSERT INTO Sales (1,&#039;Very Good&#039;);
INSERT INTO Sales (1,&#039;Bad&#039;);
INSERT INTO Sales (2,&#039;Not Good&#039;);
INSERT INTO Sales (1,&#039;Not Working&#039;);
INSERT INTO Sales (2,&#039;Working&#039;);
INSERT INTO Sales (1,&#039;Defective&#039;)
 
 
CREATE FUNCTION dbo.allDescr(@id varchar(3))
RETURNS VARCHAR(max)
AS
BEGIN
DECLARE @descricoes VARCHAR(max)
SELECT @descricoes = coalesce(@descricoes+&#039;, &#039;,&#039;&#039;) + Description FROM Description_Sales WHERE Sales_Id = @Id
RETURN @descricoes
END
GO

select distinct sales_id, dbo.allDescr(sales_id) as Description from Description_Sales order by sales_id]]></description>
		<content:encoded><![CDATA[<p>Hi, JoeJay,</p>
<p>The solution for your problem is :</p>
<p>CREATE TABLE Description_Sales<br />
(<br />
Sales_Id VARCHAR(3),<br />
[Description] VARCHAR(15)<br />
)</p>
<p>INSERT INTO Sales VALUES (1,&#8217;Good&#8217;);<br />
INSERT INTO Sales (1,&#8217;Very Good&#8217;);<br />
INSERT INTO Sales (1,&#8217;Bad&#8217;);<br />
INSERT INTO Sales (2,&#8217;Not Good&#8217;);<br />
INSERT INTO Sales (1,&#8217;Not Working&#8217;);<br />
INSERT INTO Sales (2,&#8217;Working&#8217;);<br />
INSERT INTO Sales (1,&#8217;Defective&#8217;)</p>
<p>CREATE FUNCTION dbo.allDescr(@id varchar(3))<br />
RETURNS VARCHAR(max)<br />
AS<br />
BEGIN<br />
DECLARE @descricoes VARCHAR(max)<br />
SELECT @descricoes = coalesce(@descricoes+&#8217;, &#8216;,&#8221;) + Description FROM Description_Sales WHERE Sales_Id = @Id<br />
RETURN @descricoes<br />
END<br />
GO</p>
<p>select distinct sales_id, dbo.allDescr(sales_id) as Description from Description_Sales order by sales_id</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil Vanjre</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-84531</link>
		<dc:creator><![CDATA[Anil Vanjre]]></dc:creator>
		<pubDate>Wed, 18 Aug 2010 13:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-84531</guid>
		<description><![CDATA[Hi Pinal Dave,

Why Can&#039;t we use order by clause in view]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Dave,</p>
<p>Why Can&#8217;t we use order by clause in view</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaushlendra Pandey</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-79198</link>
		<dc:creator><![CDATA[Kaushlendra Pandey]]></dc:creator>
		<pubDate>Thu, 08 Jul 2010 10:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-79198</guid>
		<description><![CDATA[I want to ask one question,Can we update multiple table in one update statement. As per my understanding We can not. Could you please confirm.]]></description>
		<content:encoded><![CDATA[<p>I want to ask one question,Can we update multiple table in one update statement. As per my understanding We can not. Could you please confirm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balasubramaniyam.G</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-62088</link>
		<dc:creator><![CDATA[Balasubramaniyam.G]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 14:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-62088</guid>
		<description><![CDATA[Hi Pinal Dave,

Please clarify, what is behind the scene..
It is working in sql server 2005

create function tt1() returns datetime
begin
Declare @s datetime
select @s=getdate()
 return @s
end

select dbo.tt1()]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Dave,</p>
<p>Please clarify, what is behind the scene..<br />
It is working in sql server 2005</p>
<p>create function tt1() returns datetime<br />
begin<br />
Declare @s datetime<br />
select @s=getdate()<br />
 return @s<br />
end</p>
<p>select dbo.tt1()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manesh Joseph</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-61471</link>
		<dc:creator><![CDATA[Manesh Joseph]]></dc:creator>
		<pubDate>Fri, 19 Feb 2010 10:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-61471</guid>
		<description><![CDATA[Hi Pinal,

I think functions like getdate() can be used in UDFs of SQL Server 2008. Could you please clarify if any other changes to your above mentioned article with respect to UDFs in SQL Server 2008

Thanks,
Manesh Joseph]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I think functions like getdate() can be used in UDFs of SQL Server 2008. Could you please clarify if any other changes to your above mentioned article with respect to UDFs in SQL Server 2008</p>
<p>Thanks,<br />
Manesh Joseph</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-59660</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Tue, 12 Jan 2010 18:12:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-59660</guid>
		<description><![CDATA[Hello Paul,

No, we can&#039;t use DML in UDF. We can not perform any activity in UDF that makes any change effect on data. 

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Paul,</p>
<p>No, we can&#8217;t use DML in UDF. We can not perform any activity in UDF that makes any change effect on data. </p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-59623</link>
		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Tue, 12 Jan 2010 08:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-59623</guid>
		<description><![CDATA[Can we use DML statement in UDF?]]></description>
		<content:encoded><![CDATA[<p>Can we use DML statement in UDF?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Morel</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-57939</link>
		<dc:creator><![CDATA[Richard Morel]]></dc:creator>
		<pubDate>Thu, 26 Nov 2009 11:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-57939</guid>
		<description><![CDATA[UDF can not Return XML 
FOR XML is not allowed in UDF 

Hi,

I think the above statement is incorrect - I&#039;ve written plenty of UDFs that return XML and use FOR XML.

Thanks,
Richard]]></description>
		<content:encoded><![CDATA[<p>UDF can not Return XML<br />
FOR XML is not allowed in UDF </p>
<p>Hi,</p>
<p>I think the above statement is incorrect &#8211; I&#8217;ve written plenty of UDFs that return XML and use FOR XML.</p>
<p>Thanks,<br />
Richard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-55178</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Tue, 25 Aug 2009 03:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-55178</guid>
		<description><![CDATA[@AG

Dynamic SQL cannot be used in Function Period. 

CLR can have dynamic SQL, but it is not suggested to have dynamic SQL in functions. 


@EC

Please help us to help you, Please give more information, Information you provided is not clear. 

Using Dynamic SQL Anything can be done. 

~ IM.]]></description>
		<content:encoded><![CDATA[<p>@AG</p>
<p>Dynamic SQL cannot be used in Function Period. </p>
<p>CLR can have dynamic SQL, but it is not suggested to have dynamic SQL in functions. </p>
<p>@EC</p>
<p>Please help us to help you, Please give more information, Information you provided is not clear. </p>
<p>Using Dynamic SQL Anything can be done. </p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EC</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-55155</link>
		<dc:creator><![CDATA[EC]]></dc:creator>
		<pubDate>Mon, 24 Aug 2009 10:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-55155</guid>
		<description><![CDATA[Hi,

Same problem with AG, let say i have n tables that has identical structure which table name let say tableA, tableB, tableC ... next to n. I wanna create an SP that can combine and join between those table(s), and since i can&#039;t use a dynamic T-SQL query to implement this problem any one know what should i do??

Thanks for all comments
EC]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Same problem with AG, let say i have n tables that has identical structure which table name let say tableA, tableB, tableC &#8230; next to n. I wanna create an SP that can combine and join between those table(s), and since i can&#8217;t use a dynamic T-SQL query to implement this problem any one know what should i do??</p>
<p>Thanks for all comments<br />
EC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AG</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-54951</link>
		<dc:creator><![CDATA[AG]]></dc:creator>
		<pubDate>Tue, 18 Aug 2009 06:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-54951</guid>
		<description><![CDATA[Hi,
     I&#039;m trying to use a table valued function (which returns a table), but the UDF does not allow me to execute a dynamic T-SQL query. Is it possible to return a table from a stored procedure ( I know a stored procedure does not have a return value, but is there some way possible to get a table output) ? I&#039;m not talking about returning data from a temporary table, but the table as a whole. I have another stored procedure which should call the prevous procedure and use it&#039;s output table in a join query.

Thanks,
AG]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
     I&#8217;m trying to use a table valued function (which returns a table), but the UDF does not allow me to execute a dynamic T-SQL query. Is it possible to return a table from a stored procedure ( I know a stored procedure does not have a return value, but is there some way possible to get a table output) ? I&#8217;m not talking about returning data from a temporary table, but the table as a whole. I have another stored procedure which should call the prevous procedure and use it&#8217;s output table in a join query.</p>
<p>Thanks,<br />
AG</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diana</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-44237</link>
		<dc:creator><![CDATA[Diana]]></dc:creator>
		<pubDate>Sun, 16 Nov 2008 10:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-44237</guid>
		<description><![CDATA[One more limitation: SQL 2005 does not allow calls to remote table valued functions. You have to use a stored procedure.]]></description>
		<content:encoded><![CDATA[<p>One more limitation: SQL 2005 does not allow calls to remote table valued functions. You have to use a stored procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MJ</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-43904</link>
		<dc:creator><![CDATA[MJ]]></dc:creator>
		<pubDate>Fri, 24 Oct 2008 21:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-43904</guid>
		<description><![CDATA[Is there any way to return a table from a UDF. (table based UDF) but create the columns dynamically within the UDF? So sometimes you call the UDF and it returns a table with say 2 columns and at another time based on the arguments would return a table with 3 columns?

Thanks
MJ]]></description>
		<content:encoded><![CDATA[<p>Is there any way to return a table from a UDF. (table based UDF) but create the columns dynamically within the UDF? So sometimes you call the UDF and it returns a table with say 2 columns and at another time based on the arguments would return a table with 3 columns?</p>
<p>Thanks<br />
MJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41807</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Wed, 20 Aug 2008 06:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41807</guid>
		<description><![CDATA[@JeoJay,

One of our freind a very good and compact code which applied to your case as well, Please check it out here...

http://blog.sqlauthority.com/2008/07/16/sql-server-readers-contribution-to-site-simple-example-of-cursor/

Read the comment for this post, thats your solution.

Hope this helps.
Imran.]]></description>
		<content:encoded><![CDATA[<p>@JeoJay,</p>
<p>One of our freind a very good and compact code which applied to your case as well, Please check it out here&#8230;</p>
<p><a href="http://blog.sqlauthority.com/2008/07/16/sql-server-readers-contribution-to-site-simple-example-of-cursor/" rel="nofollow">http://blog.sqlauthority.com/2008/07/16/sql-server-readers-contribution-to-site-simple-example-of-cursor/</a></p>
<p>Read the comment for this post, thats your solution.</p>
<p>Hope this helps.<br />
Imran.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JoeJay</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41799</link>
		<dc:creator><![CDATA[JoeJay]]></dc:creator>
		<pubDate>Tue, 19 Aug 2008 19:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41799</guid>
		<description><![CDATA[Hey, is it possible for anyone who could assist me to get a UDF function code in SQL for concantinating multiple row values which may relate to the same id in to one column by seperating comma..for a display

Eg..

Sale Id              Description
oo1                   Good
001                   Very Good
001                   Bad
002                   Not good
001                   Not Working
002                   Working
001                   Defective

Display must be in the form

001          Good, Very Good, Bad, Defective
002          Not Good, Working]]></description>
		<content:encoded><![CDATA[<p>Hey, is it possible for anyone who could assist me to get a UDF function code in SQL for concantinating multiple row values which may relate to the same id in to one column by seperating comma..for a display</p>
<p>Eg..</p>
<p>Sale Id              Description<br />
oo1                   Good<br />
001                   Very Good<br />
001                   Bad<br />
002                   Not good<br />
001                   Not Working<br />
002                   Working<br />
001                   Defective</p>
<p>Display must be in the form</p>
<p>001          Good, Very Good, Bad, Defective<br />
002          Not Good, Working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bishwajeet</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41479</link>
		<dc:creator><![CDATA[bishwajeet]]></dc:creator>
		<pubDate>Fri, 08 Aug 2008 06:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-41479</guid>
		<description><![CDATA[sir want to create stored procedure to transfer data from machine to another. first it will check the numbers of columns then data type and constrainst . if comparing is teur then only it will transfer data to another machine.]]></description>
		<content:encoded><![CDATA[<p>sir want to create stored procedure to transfer data from machine to another. first it will check the numbers of columns then data type and constrainst . if comparing is teur then only it will transfer data to another machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-40295</link>
		<dc:creator><![CDATA[Jack]]></dc:creator>
		<pubDate>Wed, 16 Jul 2008 02:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-40295</guid>
		<description><![CDATA[Hi,

Is there any workaround so that I can create temporary UDFs inside a stored procedure ? similar to a temp stored procedure inside another stored procedure...]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Is there any workaround so that I can create temporary UDFs inside a stored procedure ? similar to a temp stored procedure inside another stored procedure&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-37178</link>
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 07 May 2008 10:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-37178</guid>
		<description><![CDATA[Functions GETDATE() etc can not be used UDFs, but can be used in Stored Procedure 
...
Then, what about the following funtion?

create function dbo.func_getdate()
returns nvarchar(50)
with execute as caller
as
begin
declare @str nvarchar(50)
set @str = N&#039;now is: &#039; + convert(nvarchar(30), getdate(), 121)
return @str
end
go

select dbo.func_getdate()
go

I create and use it in 2008, I am not sure whether it can work in 2005, 2000,...]]></description>
		<content:encoded><![CDATA[<p>Functions GETDATE() etc can not be used UDFs, but can be used in Stored Procedure<br />
&#8230;<br />
Then, what about the following funtion?</p>
<p>create function dbo.func_getdate()<br />
returns nvarchar(50)<br />
with execute as caller<br />
as<br />
begin<br />
declare @str nvarchar(50)<br />
set @str = N&#8217;now is: &#8216; + convert(nvarchar(30), getdate(), 121)<br />
return @str<br />
end<br />
go</p>
<p>select dbo.func_getdate()<br />
go</p>
<p>I create and use it in 2008, I am not sure whether it can work in 2005, 2000,&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorel</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-34582</link>
		<dc:creator><![CDATA[Jorel]]></dc:creator>
		<pubDate>Wed, 26 Mar 2008 14:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-34582</guid>
		<description><![CDATA[Hello Prasad, you can create a view

CREATE VIEW view_month AS
SELECT month(getdate()) as current_month

Then inside the function simply do

select @month = current_month from view_month

and return @month

This is cheating but it works great]]></description>
		<content:encoded><![CDATA[<p>Hello Prasad, you can create a view</p>
<p>CREATE VIEW view_month AS<br />
SELECT month(getdate()) as current_month</p>
<p>Then inside the function simply do</p>
<p>select @month = current_month from view_month</p>
<p>and return @month</p>
<p>This is cheating but it works great</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sankalp Mehta</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-33270</link>
		<dc:creator><![CDATA[Sankalp Mehta]]></dc:creator>
		<pubDate>Fri, 25 Jan 2008 12:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-33270</guid>
		<description><![CDATA[I am developing an accounting package in vb and msde 2000.

I want to transfer all the tables format, stored procedures, user defined functions etc. created in the current database to newly created database.

I am creating new year database using sql dmo method.
I am creating stored procedures in current year using execute method as follows :

I created a stored procedure in model database which contains code to create all the necessary tables for my application.

Now I want dynamically, using vb code,
copy or create user defined functions and stored procedure from my current database to newly created database.

how it is possible ????????????]]></description>
		<content:encoded><![CDATA[<p>I am developing an accounting package in vb and msde 2000.</p>
<p>I want to transfer all the tables format, stored procedures, user defined functions etc. created in the current database to newly created database.</p>
<p>I am creating new year database using sql dmo method.<br />
I am creating stored procedures in current year using execute method as follows :</p>
<p>I created a stored procedure in model database which contains code to create all the necessary tables for my application.</p>
<p>Now I want dynamically, using vb code,<br />
copy or create user defined functions and stored procedure from my current database to newly created database.</p>
<p>how it is possible ????????????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prashantvictory</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-16360</link>
		<dc:creator><![CDATA[prashantvictory]]></dc:creator>
		<pubDate>Thu, 25 Oct 2007 04:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-16360</guid>
		<description><![CDATA[Hi pinal in your article there is a wrong point that is;
&quot;&quot;UDF can have upto 1023 input parameters, Stored Procedure can have upto 21000 input parameters.&quot;&quot;

You said SP&#039;s can accept 21000 parameters But i think this is not 21000 its 2100 for refrence please read the following article by microsoft,
http://msdn2.microsoft.com/en-us/library/ms187926.aspx

Thank you!]]></description>
		<content:encoded><![CDATA[<p>Hi pinal in your article there is a wrong point that is;<br />
&#8220;&#8221;UDF can have upto 1023 input parameters, Stored Procedure can have upto 21000 input parameters.&#8221;"</p>
<p>You said SP&#8217;s can accept 21000 parameters But i think this is not 21000 its 2100 for refrence please read the following article by microsoft,<br />
<a href="http://msdn2.microsoft.com/en-us/library/ms187926.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms187926.aspx</a></p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anup</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-14897</link>
		<dc:creator><![CDATA[Anup]]></dc:creator>
		<pubDate>Sat, 06 Oct 2007 13:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-14897</guid>
		<description><![CDATA[Hi,

I want to run dbcc inputbuffer in udf and only return the event info column result.

I will be using it in select query, can u help]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to run dbcc inputbuffer in udf and only return the event info column result.</p>
<p>I will be using it in select query, can u help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasad</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-14142</link>
		<dc:creator><![CDATA[Prasad]]></dc:creator>
		<pubDate>Wed, 26 Sep 2007 01:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-14142</guid>
		<description><![CDATA[Dear sir,

I hav searched your article to find a solution for my problem.
I want to create an user defined function which returns the current month ...the problem behind this is we cant use getdate() as you said earlier.

Can any one give a solution....]]></description>
		<content:encoded><![CDATA[<p>Dear sir,</p>
<p>I hav searched your article to find a solution for my problem.<br />
I want to create an user defined function which returns the current month &#8230;the problem behind this is we cant use getdate() as you said earlier.</p>
<p>Can any one give a solution&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - 2005 - Use of Non-deterministic Function in UDF - Find Day Difference Between Any Date and Today Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-9063</link>
		<dc:creator><![CDATA[SQL SERVER - 2005 - Use of Non-deterministic Function in UDF - Find Day Difference Between Any Date and Today Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Thu, 23 Aug 2007 14:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/#comment-9063</guid>
		<description><![CDATA[[...] thought that use of Non-Deterministic function is prohibited in UDF. I even wrote about it earlier SQL SERVER - User Defined Functions (UDF) Limitations. It seems like SQL Server 2005 either have removed this restriction or it is bug. I think I will [...]]]></description>
		<content:encoded><![CDATA[<p>[...] thought that use of Non-Deterministic function is prohibited in UDF. I even wrote about it earlier SQL SERVER &#8211; User Defined Functions (UDF) Limitations. It seems like SQL Server 2005 either have removed this restriction or it is bug. I think I will [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

