Skip to content
MidnightDBA

MidnightDBA

We make videos while you sleep

  • About us
  • Links
  • FAQs
  • Contact

Tag: T-SQL

1NF – 1st Normal Form

Here I’m talking about 1NF, not only in the context of a table, but also in the context of a DB or even an enterprise.

Author Sean McCownPosted on June 3, 2022Categories Development, TSQLTags Development, Modeling, T-SQL

T-SQL: Switching data with a Single Partition

This is the fastest way to move data to a new table. Of course, you have to move all the data, but it’s quite useful. Tables are partitioned in SQL by default so this is a great technique.

Author Sean McCownPosted on February 11, 2022Categories Development, TSQLTags Development, T-SQL

Microsoft SQL Server – T-SQL: Switching data with a Single Partition

This is the fastest way to move data to a Continue reading “Microsoft SQL Server – T-SQL: Switching data with a Single Partition”

Author Sean McCownPosted on February 11, 2022May 11, 2022Categories Development, TSQLTags Development, T-SQL

Master Stored Procedure Workshop: Part 2

Master Stored Procedure Workshop: Part 2

This is part 2 of the previous session from SQLSaturday Continue reading “Master Stored Procedure Workshop: Part 2”

Author Sean McCownPosted on April 1, 2019April 1, 2019Categories Development, TSQLTags Development, SQL Saturday, Stored Procedures, T-SQL

Master Stored Procedure Workshop: Part 1

Master Stored Procedure Workshop: Part 1

This is from SQLSaturday Richmond, VA on 3/30/2019.
I’m teaching stored Continue reading “Master Stored Procedure Workshop: Part 1”

Author Sean McCownPosted on April 1, 2019April 1, 2019Categories Development, TSQLTags Development, SQL Saturday, Stored Procedures, T-SQL

Database Unit Testing with SSDT

Database Unit Testing with SSDT

DB unit testing has been a cloud for a long Continue reading “Database Unit Testing with SSDT”

Author Sean McCownPosted on August 24, 2018August 24, 2018Categories DevelopmentTags .NET, Development, T-SQL, Troubleshooting, Visual Studio

REGEX: Use Lookbehind for PRINT Statements

REGEX: Use Lookbehind for PRINT Statements

Regular find can’t show you negative searches. That’s searches where letters don’t exist. So here I’m going to show you how to find Continue reading “REGEX: Use Lookbehind for PRINT Statements”

Author Sean McCownPosted on April 30, 2018April 30, 2018Categories AdministrationTags Administration, Development, Regex, T-SQL

What is a Stored Procedure

What is a Stored Procedure

Here Jen explains what a stored procedure is, and how to create a basic one with no parameters. She also compares it with other Continue reading “What is a Stored Procedure”

Author Sean McCownPosted on December 7, 2017December 20, 2017Categories Development, TSQLTags Development, T-SQL

Insert Into vs. Select Into

Insert Into vs. Select Into

Knowing how and when to use Insert Into or Select Into can quite often make or break your load process. Here I show you Continue reading “Insert Into vs. Select Into”

Author Sean McCownPosted on December 7, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Querying Dev Metadata

Querying Dev Metadata

Sometimes you need to get info on objects you’ve created. Here you can see how you can query for this info, and even learn Continue reading “Querying Dev Metadata”

Author Sean McCownPosted on December 7, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Best Habit for Coders

Best Habit for Coders

There’s a step you can make in your code to improve it many times over. It’s an easy step to take, but it can Continue reading “Best Habit for Coders”

Author Sean McCownPosted on December 7, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

UNION and UNION ALL

UNION and UNION ALL

Here I talk about UNION and UNION ALL, and the different rules about using ORDER BY, GROUP BY, SELECT INTO, and INSERT INTO with a Continue reading “UNION and UNION ALL”

Author Sean McCownPosted on November 14, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Designing Efficient Functions

Designing Efficient Functions

Here I get on my cert soapbox again. I was going through a practice cert exam and came across an answer to a question Continue reading “Designing Efficient Functions”

Author Sean McCownPosted on October 10, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

T-SQL Code Sins

T-SQL Code Sins

SPEAKER: Jen McCown. Do you know how to set yourself for good coding practices? Well Jen does. Come see the advice she Continue reading “T-SQL Code Sins”

Author Sean McCownPosted on October 10, 2017December 21, 2017Categories Development, Events, TSQLTags Development, SQL Saturday, T-SQL

Relational Division

Relational Division

Here we discuss relational division, the counterpart to relational multiplication (cross joins). We’ll hit a couple of examples, using subqueries to implement two different Continue reading “Relational Division”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Relational Multiplication

Relational Multiplication

Here’s a quick talk on relational multiplication that gets us to take a closer look at what our joins are really doing.

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Using TFS in SSMS

Using TFS in SSMS

Here I show you how to set SSMS up to work with Team Foundation Server

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

T-SQL: Find Last Day of Month

T-SQL: Find Last Day of Month

Follow Jen as she steps you through 3 progressively elegant solutions for finding the last day of the month.

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Grouping Sets

Grouping Sets

Here Jen and I go over grouping sets the only way we can. I hope you guys enjoy us late at night.

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

T-SQL: Over() and Partition By

T-SQL: Over() and Partition By

Show how to use OVER and PARTITION BY to get groups of data with aggregation.

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Insert Non-duplicate Rows

Insert Non-duplicate Rows

Here we work our way through a coding scenario—inserting rows—that should illustrate the process of solving a problem from the simplest case to your intended Continue reading “Insert Non-duplicate Rows”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Source Control in SSMS

Source Control in SSMS

Here I show you how to setup source control in SSMS and who should and shouldn’t use it.

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Dirty Tricks: Text Manipulation

Dirty Tricks: Text Manipulation

Dirty tricks are the little tricks we use that aren’t official, may not be “proper”, but are insanely useful. Today we look at script building Continue reading “Dirty Tricks: Text Manipulation”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Dirty Tricks 2: Get List From Command Line

Dirty Tricks 2: Get List From Command Line

Here’s one of my dirty tricks: getting a list of folders or files from a command prompt, and formatting it for use in code using Continue reading “Dirty Tricks 2: Get List From Command Line”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

TSQL: Grouping Basics

TSQL: Grouping Basics

Here’s a ground level intro to grouping, with a lovely 80s arcade theme. This is a reshoot of the original Grouping Basics video (now Continue reading “TSQL: Grouping Basics”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

T-SQL: CASE Statement

T-SQL: CASE Statement

Here’s an intro to case statements, in the form of a conversation with Sean. I cover simple case and searched case, and the special Continue reading “T-SQL: CASE Statement”

Author Sean McCownPosted on October 5, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Sending HTML SQL Emails

Sending HTML SQL Emails

I’m actually excited to be able to bring you this video because this is a topic that comes up quite often in DBA circles. Continue reading “Sending HTML SQL Emails”

Author Sean McCownPosted on October 2, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

SSIS Scripting Languages

SSIS Scripting Languages

This covers how to change the scripting language in SSIS for Katmai.

Author Sean McCownPosted on October 2, 2017December 21, 2017Categories Development, SSISTags Development, T-SQL

Write Good Dynamic SQL

Write Good Dynamic SQL

Here I show you a couple methods for getting around really hard to read dynamic SQL.

Author Sean McCownPosted on October 2, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

Simple Backup Procedures

Simple Backup Procedures

This is a tutorial not only on how to turn your backup commands into SPs, but also the basics of stored procedures are discussed.

Author Sean McCownPosted on October 1, 2017December 21, 2017Categories Administration, Backup and Restore, Development, TSQLTags Administration, Backup/Restore, Development, T-SQL

Select Into with Identity()

Select Into with Identity()

This video shows you how to use the Identity() function to create an identity column on the fly during a select into statement. You don’t Continue reading “Select Into with Identity()”

Author Sean McCownPosted on October 1, 2017December 21, 2017Categories Development, TSQLTags Development, T-SQL

BROWSE VIDEOS

By Subject

  • Administration
    • Backup and Restore
    • BCP
    • Optimization
    • Powershell
    • Other
  • Development
    • SSIS
    • TSQL
    • Other
  • Minion
    • Minion Enterprise
    • Minion Backup
    • Minion Reindex
    • Minion CheckDB

WEBSHOW

  • DBA’s@midnight
    • Season 1
    • Season 2
    • Season 3
    • Season 4

BROWSE CATEGORIES

  • Administration
  • Backup and Restore
  • BCP
  • DBAs@Midnight
  • Development
  • Events
  • HADR
  • Minion
  • Minion Backup
  • Minion CheckDB
  • Minion Enterprise
  • Minion Reindex
  • Optimization
  • Other
  • Other
  • Powershell
  • season 1
  • Security
  • SSIS
  • SSRS
  • TSQL
  • Uncategorized

BROWSE TAGS

.NET Administration AWS Backup/Restore BCP Clustering Config Development Enterprise Administration File issues File processing HADR HTML Index Maintenance Minion Backup Minion CheckDB Minion Enterprise Minion Reindex Modeling Office365 Performance Powershell Regex Reindex Replication S3 Script Task Security SMO Soft Skills SQL Saturday SSIS SSRS Stored Procedures T-SQL Troubleshooting Virtual Computing Visual Studio Windows

OUR WEBSITES


BLOGS

DBA Rant
The MidnightDBA Star
Minion Blog

  • About us
  • Links
  • FAQs
  • Contact
Copyright MidnightDBA