Choosing the right Wise Owl SQL training course

If you're trying to get information out of your corporate SQL Server database, sooner or later you're going to have to learn T-SQL (Microsoft's dialect of SQL).

Or if you already know SQL, consider learning SQL Server Reporting Services, allowing you to create reports from SQL Server quickly and powerfully.

You can see full details of our SQL training at our SQL home page.  Below is a sample of what you'll learn on each of our two scheduled SQL courses.

 Introductory course - selecting data

On our two-day basic SQL course you'll learn how to select data, including using criteria, expressions, joins, and grouping.  Here's an example of the sort of SQL statement you'll be in a position to write after the course:

-- show the number of Oscar-winning films

-- for each director (but only show directors

-- who have made more than one Oscar-winning film)

SELECT

d.DirectorName,

COUNT(f.FilmId) AS 'Number films'

FROM

tblFilm AS f

INNER JOIN tblDirector AS d

ON f.FilmDirectorId=d.DirectorId

INNER JOIN tblStudio AS s

ON f.FilmStudioId=s.StudioId

WHERE

f.FilmOscarWins > 0

GROUP BY

d.DirectorName

It may not make complete sense now, but it will after the course!

You'll not just learn how to write SQL, but also how to write good SQL - using comments, indentation and good capitalisation conventions as in the above example.

Advanced course - programming in SQL

Our two-day advanced SQL class will show you how to create stored procedures, user-defined functions and other programs in SQL.  Here's an example of what this course will cover - a stored procedure taking parameters:

CREATE PROC spListFilmsWithParameters (

@MinDate date=null,

@MaxDate date=null,

@ContainsText varchar(MAX)=''

AS

 

-- show films made between given dates, and whose

-- titles contain given text (but let user omit parameters)

SELECT

FilmName,

FilmReleaseDate

FROM

tblFilm

WHERE

(FilmReleaseDate >= @MinDate or @MinDate is null) and

(FilmReleaseDate <= @maxdate="">or @MaxDate is null) and

(FilmName like '%' + @ContainsText + '%')

Here's another example, using a table variable to accumulate data:

DECLARE @OldHands TABLE (

PersonName varchar(50),

PersonRole varchar(50),

BirthDate datetime

-- get the directors

INSERT INTO @OldHands

SELECT

DirectorName AS PersonName,

'Director' AS PersonRole,

DirectorDob AS BirthDate

FROM

tblDirector

WHERE

DirectorDob <>'19140101'

 

-- and add on the actors

INSERT INTO @OldHands

SELECT

a.ActorName,

'Actor',

ActorDob

FROM

tblActor AS a

WHERE (

SELECT COUNT(*) FROM tblCast AS c

WHERE a.ActorId=c.CastActorId

) >= 9

 

GO

 

-- use this to show details

SELECT

PersonName,

PersonRole,

CONVERT(char(10),BirthDate,103) AS DOB

FROM

@OldHands

ORDER BY

PersonName

SQL programming like this is powerful, although not for the faint-hearted!

You chouldn't consider coming on this course unless you're already comfortable writing SQL statements to select data, including using WHERE, INNER JOIN and GROUP BY clauses.

If you're still not sure which is the right SQL course for you, feel free to ask us - we'll try our best to help you!

This page has 0 threads Add post