Posted by
Andy Brown
on 08 February 2013
This blog shows you how to create table-valued functions in SQL (ie functions which return a table of data!).
Posted by
Andy Brown
on 08 February 2013
Table variables allow you to hold rows of data in temporary storage, without any processing overhead. Read this blog to add this technique to your SQL armoury!
Posted by
Andrew Gould
on 04 February 2013
While SQL Server Management Studio is a powerful tool for writing queries, it has absolutely no concessions towards making the results of those queries remotely presentable! This blog describes several techniques for getting the results of a query into another application so that you can format them to your heart’s content.
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
Andy Brown
on 28 January 2013
You can use the IF statement to test conditions in SQL - this blog explains how, and also explains why you might prefer to use CASE WHEN instead.
Posted by
Andrew Gould
on 28 January 2013
If you’ve been writing SQL queries for a while you’re probably fairly confident with writing single SELECT statements to return a set of records. If you’re ready for a bit more of a challenge, this blog will teach you how to nest one SELECT statement inside another in order to create a subquery. If you’re thinking “that sounds simple enough” then you might want to read to the end of this series, where we’ll attempt to melt your brain by explaining correlated subqueries!
Posted by
Andy Brown
on 28 January 2013
SQL comes complete with a few useful global variables, giving you information such as the row number of the record just inserted, or the number of rows affected by a query. Here's how to use them!
Posted by
Andrew Gould
on 16 January 2013
When you write queries in SQL it's immensely useful to be able to show records matching criteria that you've set. You can do this using the WHERE clause and this blog teaches you how to use it!
Posted by
Andy Brown
on 03 January 2013
Variables in SQL always begin with @, and allow you to program more efficiently. Learn the tips and tricks in this short series of blogs!
Posted by
Andy Brown
on 17 December 2012
Views are queries that you can save and reuse; but you can also use them as a basis for further queries. They do have their foibles too, as this blog explores.
Posted by
Andy Brown
on 14 December 2012
If you want to average, count, sum or perform any other statistic on values in SQL, you need to learn the GROUP BY and HAVING parts of a SQL statement. That's where this online tutorial comes in!
Posted by
Andy Brown
on 11 December 2012
You can use SQL to do everything from simple arithmetic through to complicated functions - this blog gives you the low-down!
Posted by
Andy Brown
on 10 December 2012
This short blog explains how you can create calculated formulae for fields in an SQL table (known as "computed columns").
Posted by
Andy Brown
on 30 November 2012
An in-depth SQL tutorial on how to create inner joins, left outer joins, right outer joins, full outer joins, cross joins and self-joins!
Posted by
Andy Brown
on 19 November 2012
A guide to how to create databases in SQL Server Management Studio, including creating tables, indexing columns and using database diagrams to create relationships between tables.
Posted by
Andy Brown
on 08 November 2012
If you don't want to see a full set of records from a table in SQL, you can use a WHERE statement to filter out unwanted rows, as shown in this blog.
Posted by
Andy Brown
on 12 October 2012
There are various ways to insert data into new or existing tables in T-SQL - this blog gives examples of each.
Posted by
Andy Brown
on 05 October 2012
SQL doesn’t just select data; you can also use it to create tables and link them together with relationships. This blog shows you how!
Posted by
Andy Brown
on 05 October 2012
Whether you're creating tables in SQL Server, using SQL variables or passing parameters to stored procedures, you'll need to understand what the possible data types that you can use are.
Posted by
Andy Brown
on 06 August 2012
To make report navigation easier, you can create a 2-dimensional matrix of clickable links at the top of a report. This blog shows you how!