SQL Server

What is a table expression? Table expressions are named query expressions that represent a valid relational table. Microsoft SQL Server supports four types of table expressions: derived tables, common table expressions (CTEs), views, and inline table-valued functions (inline TVFs). Table expressions are not physically materialized anywhere; they are virtual and […]

SQL Server Table Expressions

SQL Server 2005 introduced the APPLY operator, which is very much like a join clause. APPLY allows the joining of two table expressions. The difference between join and the APPLY operator becomes evident when you have a table-valued expression on the right side and you want this table-valued expression to […]

SQL Server Apply

There is a good article at SQLServerCentral.com that helps you troubleshoot this error 15517 on SQL Server. I got this error when I tried to create a database diagram on one of my databases. The other databases were fine. The article is called Troubleshooting SQL Server Error 15517. I read […]

SQL Server Error 15517

This post describes how you can create a user-defined function in SQL Server. We will start off with a simple example that does not take any arguments in. It only returns the current date. You don’t need to actually write this yourself because SQL Server already has a function to […]

SQL Server Functions