2022-07-27
581 reads
2022-07-27
581 reads
The Problem Recently, while working with one of my clients, I came across a script in which I had to introduce a scalar User-Defined Function in the SELECT statement. The SELECT used to return around 750K records. However, after introducing the UDF, the row count significantly increased to 826K. There were no other changes made […]
2019-10-14
4,960 reads
2008-05-20
4,221 reads
This article describes and demonstrates the problem of using asterisk to select all fields from a table within a table function. (from Apr 2008)
2009-09-11 (first published: 2008-04-30)
18,650 reads
This UDF returns a multi column table of values from an input string of comma separated values
2008-06-11 (first published: 2008-04-29)
1,727 reads
2008-02-13 (first published: 2007-12-18)
1,720 reads
In the simplest terms, a user-defined function (UDF) in SQL Server is a programming construct that accepts parameters, does work that typically makes use of the accepted parameters, and returns a type of result. This article will cover two types of UDFs: table-valued and scalar-valued.
2007-12-12
3,922 reads
Calculates the nth due date for any given date, while accounting for weekends.
2012-05-16 (first published: 2007-10-11)
3,715 reads
Computed columns in SQL Server 2000 allow you to have a calculated value available easily in a query. However by using a function instead of a simple formula you can build some very interesting solutions. New author Tim Chapman brings us a look at this technique.
2006-05-09
21,363 reads
SQL Server string manipulation using T-SQL leaves lots to be desired. Many postings and complaints about T-SQL deal with strings, but there are ways to work with it. Author Eli Leiba brings us a way to split out portions of a string that contains tokens with a user defined function. Read on to see how this is accomplished and the code used to perform the splitting.
2004-12-27
11,966 reads
By Vinay Thakur
As this is an Artificial Intelligence (AI) World, things are changing. We can see that...
In a containerized app, React and Chakra UI provide a robust and accessible user...
By Steve Jones
nachlophobia – n. the fear that your deepest connections with people are ultimately pretty...
Guys - I need your help on this.... I like to create an linked...
Comments posted to this topic are about the item Doing a Little Research
Comments posted to this topic are about the item An introduction to Terraform
What is returned from this query?
SELECT ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2011' AND soh.OrderDate < '01/01/2012') AS OrdersIn2000 , ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2012' AND soh.OrderDate < '01/01/2013') AS OrdersIn2001 , ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2013' AND soh.OrderDate < '01/01/2014') AS OrdersIn2002;See possible answers