SQL Server User Defined Function Example
In this tip we look at examples for creating SQL Server user defined functions for scalar-valued, table-valued and multi-statement table-valued functions.
Learn SQL Server functions with practical tips, examples, and tutorials to improve querying and data analysis.
In this tip we look at examples for creating SQL Server user defined functions for scalar-valued, table-valued and multi-statement table-valued functions.
In this article we look at the different types of SQL Server User Defined Functions and how they can be created and used.
In this tip we look at using different delimiters to split strings in SQL Server to show which ones work successful and which ones will cause errors.
In this tip we look at some other useful ways you can use the SQL Server FORMAT function in your daily work.
In this tip we look at how to fill gaps in dates and times for SQL Server query output when no data exists for specific dates or times.
Learn SQL Server date functions to get beginning and ending periods such as first day of the week, month, quarter, year, and dynamic end dates.
In this tip we look at how to use substring functions or similar using T-SQL, R and Python when working with SQL Server.
Learn SQL Server date and time functions SYSDATETIME, SYSDATETIMEOFFSET, SYSUTCDATETIME, CURRENT_TIMESTAMP, GETDATE(), DATENAME, DATEPART with examples.
In this tip we cover ways to improve scalar function performance in SQL Server. Functions are great for repeated use in queries, but there can be a performance impact, learn some ways to improve how functions perform.
Learn how to use T-SQL to find event dates that overlap or do not overlap based on some simple logic you can use in your queries.
In this tip, we look at a SQL Server function you can create and use to generate a CREATE TABLE script based on an input query to ensure you have the exact same data types and sizes.
In this tip we look at how we can use SQL Server DMVs to access information about SQL Server network protocol settings.
Learn how to create a comprehensive data warehouse date dimension for richer data analysis to address business and performance needs.
In this tip we look at how to take multiple rows of data and flatten the data into one row using FOR XML PATH and STRING_AGG.
In this tip we look at SQL Server sys.dm_exec_requests and various ways to use this to find active requests from connected users and applications.
In this tip we cover several different T-SQL scripts to help you get started with statistics for SQL Server data.
In this tip we look at how we can use SQL Server DMV sys.dm_exec_sessions to see what sessions are doing in SQL Server.
In this tip we take a look at you can use SQL Server table-valued functions sys.dm_exec_cursors and sys.dm_db_log_info to get more insight into SQL Server.
In this tip we look at how SQL Server computed columns and scalar functions work together and the potential performance impact.
In this tip we look at how to dynamically handle conversions when trying to build TRY_CONVERT functionality in SQL Server 2008.
In this tip we look at how we can build our own TRY_CONVERT function for versions prior to SQL Server 2012.
Read this tip to learn how to use the new SQL Server functions string_agg and string_split.
In this tip we cover a T-SQL process to collect right and wrong answers to questions to help use these data points for better decision making.
Learn about the common SQL Server date mistakes such as regional dates, shorthand, BETWEEN and more.