Wise Owl Training - SQL blogs (page 1 of 4)

Showing blogs 1-20 (out of 77)

What is SQLCMD mode, and how can you use it?

Posted by Andy Brown on 24 November 2021

You can use SQLCMD mode to parameterise the connection, database name, table name and select columns for a query - and much more besides, as this blog explains.

Tags:   SQL | SQL programming

Practise SQL in your browser with SQL Fiddle

Posted by Sam Lowrie on 01 July 2021

Some of our poor delegates don't have the luxury of a home computer to install SQL on (even worse some have made bad life choices and picked a Mac). The good news is that you can still practise your SQL skills in your web browser, using the impressive SQL Fiddle site. Have no fear, SQL Fiddle is here, a browser based sandbox to bring you cheer!

Tags:   SQL | General

What to do when you get red squiggly lines in SSMS and no Intellisense

Posted by Sam Lowrie on 28 April 2021

Normally when SQL Server Management Studio underlines words with what Microsoft call "red squigglies" it's because you haven't refreshed your local cache, but it could also be because of a recent bug - here's how to get round this!

Tags:   SQL | General

The new SQL String_Split function for comma-delimited strings

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.

Tags:   SQL | Functions

5 horrible SQL jokes and one puzzle

Posted by Sam Lowrie on 22 July 2020

Sam has a terrible sense of humour which is all too often inflicted on his delegates. Sadly, with this blog, on website viewers too ...

Tags:   SQL | General

Azure Data Studio versus SQL Server Management Studio

Posted by Andy Brown on 16 January 2020

Microsoft have brought out a new SQL editor called Azure Data Studio, to act as a substitute for SQL Server Management Studio, but this owl cannot see any justification for its existence!

Tags:   SQL | General

Introducing the new CREATE OR ALTER command in SQL

Posted by Andy Brown on 10 January 2020

From SQL Server 2016 onwards you can choose to CREATE OR ALTER a procedure, trigger, view or function, as this blog explains.

Tags:   SQL | SQL programming

You can now use AT TIME ZONE to access different time zones in SQL

Posted by Andy Brown on 25 November 2019

If you're working with different time zones, the AT TIME ZONE keywords introduced in SQL Server 2016 will make your life much easier - this blog explains how they work.

Tags:   SQL | Selecting data

Introducing three new functions in SQL to make concatenating text easier

Posted by Andy Brown on 20 September 2019

The CONCAT function makes it much easier to join columns together, while the STRING_AGG and CONCAT_WS functions make it easier to create things like comma-delimited lists.

Tags:   SQL | Calculations

Congratulations to Shaun Rowark for his suggestion for a new acronym for SFWGHO!

Posted by Andy Brown on 14 August 2019

We're always on the look-out for a new acronym for the order of SQL commands, and are pleased to award a gift voucher to another worthy winner of our competition.

Tags:   SQL | General

A table-valued function in SQL to split a comma-delimited list

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.

Tags:   SSRS | Parameters    |    SQL | Functions

Wise Owl have found one SQL structure which slows down code more than any other

Posted by Andy Brown on 13 May 2019

If your stored procedures or SQL queries are running slowly, don't bother looking at correlated subqueries, cursors, functions or any of the other usual culprits. There's one SQL syntax which Wise Owl have found to be an order of magnitude worse than any other, as this blog shows.

Tags:   SQL | General

A new acronym for the order of SQL keywords

Posted by Andy Brown on 29 March 2019

Someone has finally won our competition to think of a better acronym for the order of keywords in SQL, we're pleased to announce.

Tags:   SQL | Selecting data


Posted by Sam Lowrie on 21 June 2018

Learn how to MERGE rows from two tables into one combined table, and how to remove unwanted data from both tables.

Tags:   SQL | Programming tables

Did you know there was an IIF function in SQL to test conditions? We didn't!

Posted by Andy Brown on 16 February 2018

You can use the IIF function in SQL as an alternative to the CASE WHEN statement. We thought we would share this new (for us) discovery with the world!

Tags:   SQL | Calculations

Create your own snippets of SQL code, and insert them into your queries

Posted by Andy Brown on 23 November 2017

With SQL Server 2012 came the power not just to use pre-defined code snippets, but also to create your own - this blog explains how.

Tags:   SQL | General

Speed comparison of temporary tables against table variables

Posted by Andy Brown on 02 March 2017

When you are programming in SQL, you often have the choice of using table variables or temporary tables. This blog considers whether one method is substantially quicker than the other (spoiler alert: not really).

Tags:   SQL | Programming tables

A list of one owl's 5 favourite system stored procedures in SQL!

Posted by Andy Brown on 03 February 2017

Everyone has a favourite system stored procedure (you do, don't you?). But five? That's the subject of this blog, anyway.

Tags:   SQL | Stored procedures

Wise Owl coding standards for T-SQL (the SQL dialect used in SQL Server)

Posted by Andy Brown on 01 February 2017

A blog setting out an approach to coding in SQL to ensure consistently high standards across your organisation.

Tags:   SQL | General

Is the new(ish) FORMAT function in SQL Server slow?

Posted by Andy Brown on 16 January 2017

SQL Server 2012 saw the introduction of the T-SQL FORMAT function, making it easier to present dates nicely (no more remembering CONVERT arguments such as 103!). But is it too slow to be really useful? This blog aims to test this scientifically.

Tags:   SQL | Calculations
This page has 0 threads Add post