SQL Server Architecture Diagram

Why is our SQL Server Application running so slowly?

SQL Server Database Application performance issues?

Do you have SQL Server database applications that seem to be struggling to keep up with user demand or failing to deliver information quickly, but have no idea why?
  • Are customers complaining your system is too slow?
  • Are users complaining tasks take too long?
  • Are some client applications running slowly or timing out?
  • Are some queries/reports taking forever?

SQL Server Training Course Portfolio

What Is Microsoft SQL Server?

SQL Server is Microsoft's server based Relational Database Management System (RDBMS) providing a robust, reliable  and scalable solution for live OLTP business applications data and historic OLAP reporting and analysis systems.

The PTR SQL Server Training Course Portfolio

Our portfolio of SQL Server training courses caters for all job roles within the data management, development, and data analysis business intelligence areas of interest.

SQL Server - Querying an Excel Workbook From an SQL Query

Using a SQL Server SELECT Statement to Query an Excel Workbook

Occasionally you may find that some of the data you need to reference in a SQL Server query is located outside of the database in an Excel Workbook.

In this article we look at how you can query an Excel workbook as if it were a table in a SQL Server Database.

The SQL Server OPENROWSET function can be used to connect to a variety of data sources by means of a data provider: 

SQL Server - Extracting All The Words From a String In An SQL Query

Extracting All The Words From a String In A SQL Server Database Query

It is easy enough to extract the first word from a string in a database query, but what if you need to separate all words in a given string into a list of separate words?

This is a job for Common Table Expressions (CTEs) as they enable us to repeatedly read a single record while changing it each time.

Here is a SQL Server example which takes a string variable and spearates it into inidividual words. We use a combination of CHARINDEX, LEFT and RIGHT functions to achieve it.

SQL Server - Why is this query so slow?

How many times have you asked yourself that question?

If you work with SQL Server based applications then probably quite a few!

No matter what the application you are working with (CRM, Sales Order Processing, Financial Accounting, Contact Management, Booking System (to name but a few!)) there is a database behind it. Most common applications will store their data in either a Microsoft SQL Server Database or an Oracle Database (of course there are other relational database platforms out there).

SQL Server - SQL CROSS APPLY Statement

Using CROSS APPLY In SQL SELECT Statements

In this article I  take you through the following:

  • CROSS APPLY
  • OUTER APPLY
  • CROSS APPLY with User Defined Table Valued Functions

When Should We Use The CROSS APPLY Statement

The CROSS APPLY statement behaves in a similar fashion to a correlated subquery, but allows us to use ORDER BY statements within the subquery. This is very useful where we wish to extract the top record from a sub query to use in an outer sub query.

SQL Server - Working with Dates Part 1

Ian & I have received a lot of queries from past delegates about handling various date challenges when extracting data from SQL Server and Oracle databases, so we are adding them to our blog for your reference. There will be a series of posts and this is Part 1.

The following examples are for SQL Server, and are based on the AdventureWorks2014 sample database.

The following queries uses the DATENAME and DATEADD functions.

DATENAME Function

DATENAME can be used to extract a specified part of a date/time value. It takes two arguments:

Pages