I'm using "SQL SERVER PROJECT" in VS 2008 to create UDF in C#
Then I'm using DEPLOY command to publish DLL into MS SQL server 2005
All works well except all created UDFs are owned by me (as user)
But I wanted to keep dbo schema (eg: dbo.UDF_TEST - not jonny.UDF_TEST)
Any idea how to manage thar?
...
WACK says:
If you feel you need to have lots arguments, consider creating a CT instead.
...
CT are significantly more powerful and
flexible than custom functions. Try to
use UDF's for simple matters... Use CT
and Components for more involved
processes, especially those you can
think of as discrete actions rather
...
Hey all
Is it possible to create worksheet functions dynamically in C#, that is, without using the method attribute approach? Or is this something that's only supported using an XLL?
What I'm looking at achieving is to retrieve a functions list (along with parameters) from a source and register these functions. These functions will jus...
We're currently attempting to implement a sql server 2008 udf to do expansion of shortened urls. We have it working quite well against most of the major url shortening services. However, at seemingly random times it will "hang" and refuse to work against a certain domain (for example bit.ly) while subsequent calls to other services...
I need to determine the number of days in a month for a given date in SQL Server.
Is there a built-in function? If not, what should I use as the user-defined function?
...
I have a table-valued, inline UDF. I want to filter the results of that UDF to get one particular value. When I specify the filter using a constant parameter, everything is great and performance is almost instantaneous. When I specify the filter using a variable parameter, it takes a significantly larger chunk of time, on the order of...
I am using -
MySQL v 5.0.22,
PHP v 5.2.0,
Windows 2003,
Apache.
My skills -
Basic PHP knowledge,
Basic MySQL.
What is the best way for me to write and use a mysql user defined function in my PHP scripts?
...
There is a statement in the MySQL Docs (http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html) that is bothering me:
"A UDF contains code that becomes part of the running server, so when you write a UDF, you are bound by any and all constraints that otherwise apply to writing server code. For example, you may have problems if you at...
Hello I am coming from Bosnia and Herzegovina and in our county the smallest note bill is 0.05,
Now the government pushing us to our retrial prices rounding on 0.05 or at 0.00.
Therefor I want to create SQL Scalar Valued Function for rounding the prices on given value.
Is there some build in solution so I can save resource of my querie...
Is there anyway to optimize this horrible inefficient UDF in SQL Server 08. I am fairly new to UDF's and especially looking at them for optimizations.
UPDATE:
Should I be sending a column to a function like this if I wanted to perform it on each row and each column in a query? Is there a better way to go about this?
Thank You
** @v...
The MySQL UDF system doesn't provide a good way to have long-term persistent state.
I want to be able to write a function that takes the name of a server, and some other arguments, that connects to the server and sends a request, and returns the result. But connecting to the server is a heavyweight operation (much more than just opening...
Is it possible for a SQL CLR User-Defined Function to return the data type varbinary(MAX)?
In the documentation it mentions:
"The input parameters and the type returned from a scalar-valued function can be any of the scalar data types supported by SQL Server, except rowversion, text, ntext, image, timestamp, table, or cursor." - they d...
I have a table of dates call [BadDates], it has just one column where every record is a date to exclude. I have a UDF as follows:
CREATE FUNCTION [dbo].[udf_GetDateInBusinessDays]
(
@StartDate datetime, --Start Date
@NumberDays int --Good days ahead
)
RETURNS datetime
AS
BEGIN
-- Declare the return variable here
DECLARE ...
I'm building a network business model in excel. A similar model is that of Gawker Media.
In my model I have a number properties that have some over lap of audience. Each property attracts users, which in turn affords cross promotional opportunities. In the case of Gawker they have a series of blogs whose audience will likely read s...
One table has "John Doe <[email protected]>" while another has "[email protected]". Is there a UDF or alternative method that'll match the email address from the first field against the second field?
This isn't going to be production code, I just need it for running an ad-hoc analysis. It's a shame the DB doesn't store both friendly and non-fri...
I am making a split function in SQL Server 2005.
I have already done it by using a while loop .
But I am not happy with that. I want to do it using recursive function.
I have already done it in C#.
Now I am plotting the same in SQL SERVER 2005. But I am getting a compilation error.
Here is my code
ALTER FUNCTION [dbo].[fnSplit2]
(
...
is it possible to get a numeric parameter to my udf
and do stuff according to its type, like:
if type of @p1 is decimal(10,3)
...
else if type of @p1 is decimal(15,3)
...
else if type of @p1 is integer
...
...
is it possible for a udf to return the same data type as one of its parameters?
i would like my udf to accept a decimal of any precision and scale
and return the same type.
...
How could you remove all characters that are not alphabetic from a string?
What about non-alphanumeric?
Does this have to be a custom function or are there also more generalizable solutions?
...
Hello
I created a scalar function in the DB
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[fn_GetUserId_Username]
(
@Username varchar(32)
)
RETURNS int
AS
BEGIN
DECLARE @UserId int
SELECT @UserId = UserId FROM [User] WHERE Username = @Username
RETURN @UserId
END
Now I want to ru...