SQL SERVER BLOGS▼
- General (14)
- Tables and columns (11)
- Selecting data (8)
- WHERE criteria (5)
- Calculations (8)
- Joins (3)
- Grouping (2)
- Views (2)
- Stored procedures (5)
- SQL programming (6)
- Programming tables (4)
- CTEs, subqueries (6)
- Errors, debugging (2)
- Functions (5)
- Dynamic SQL (3)
- Transactions (3)
- Cursors (1)
- Triggers (1)
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
Blogs from Wise Owl on Functions in SQL
Showing blogs 1-5 (out of 5)
Posted by Andy Brown on 22 March 2021
If you're using SQL Server with compatibility level 130 or greater you can now use the new String_Split function to divide a comma-delimited string into a table of values.
Posted by Andy Brown on 11 June 2019
If you're creating Reporting Services reports using multivalue parameters and stored procedures, you'll find this function to split a list of values into a single-table column useful.
Posted by Andy Brown on 03 May 2013
For the sake of completeness, this blog explains how to join to the results of table-valued functions (like a correlated subquery on steroids).
Posted by Andrew Gould on 01 February 2013
If you have a calculation that you frequently use in SQL queries you're probably bored of writing out the same code time after time. Why not try creating a user-defined function to save you the hassle? This blog teaches you how to define your own custom functions, including how to use input parameters, how to alter a function after you've created it, and even how to use fancy programming techniques such as variables and IF statements to help structure complex sequences of calculations.
Posted by Andrew Gould on 16 February 2012
A common requirement in SQL queries is calculating a person's age. The expression you need to do this accurately is relatively long, so why not replace it with a user-defined function? This blog shows you how!