Blogs from Wise Owl on Functions in SQL

Showing blogs 1-3 (out of 3)

Using OUTER and CROSS APPLY joins to link to table-valued functions

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).

Tags:   SQL | Joins    |    SQL | Functions    |    T-SQL | SQL Tutorial

Scalar User Defined Functions in SQL Server - UDFs

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.

Tags:   SQL | Functions    |    T-SQL | SQL Tutorial

Calculating Age in SQL with a User-Defined Function

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!

Tags:   SQL | Calculations    |    SQL | Functions    |    T-SQL | SQL Tutorial
This page has 0 threads Add post