Here is a short video tutorial that shows how to use the COALESCE function in T-SQL on SQL Server. This was originally part of my free SQL query training for the 70-461 certification exam. Here is the first sample code from the video: And then the code that shows the performance differences: More Info: Additional Training on my YouTube Channel …

Using the TSQL COALESCE Function Read more »

In this presentation we will be training on TSQL Functions, there will be three sections. —Date and Time Functions —Logical Functions —User Defined Functions Here is the link to the Google On Air Broadcast where you can watch live (or recorded later) for free. https://plus.google.com/events/cb0pj9ghp5elt6i241kstphcvr0 Here are the slides. And here is the broadcast at YouTube: This session will be …

SQL Training – Functions (70-461) Read more »

A cursor is a tool in SQL Server that allows a user to traverse through the rows of a result set one row at a time. This can be useful for performing operations on each row of the result set individually, such as updating or deleting specific rows. Cursors are created using the DECLARE CURSOR statement, and are associated with …

Simple Introduction to TSQL Cursors Read more »

On Thursday March 19th at 9:00am (pacific time), we will be hosting another free training provided by Aaron Buma and I to prepare for the Microsoft 70-461 SQL Queries exam. This week we will be a three part session on functions. This is provided free of charge to give back to the SQL community. We have been getting quite a following so …

Next Weekly Training: Functions (Logical Functions, Time Functions, and UDFs) Read more »

Here is the outline: Using Cursors Using String Functions Here is the link to the Google On Air Broadcast where you can watch for free. https://plus.google.com/events/ci8jms67qttuteegimrf4sj70sk After the presentation, I will update this page with a link to the YouTube video. This session will be about 90 minutes, Aaron Buma will present about half and I will present the other …

Today’s Live Training: Using Cursors and TSQL String Functions Read more »

First lets take a look at two queries using CURSORS, the first one will use the FORWARD_ONLY type cursor, and the second will use the FAST_FORWARD type cursor. These two types sound very similar, but perform quite differently. Now for the FAST_FORWARD CURSOR example. Notice only one line has changed, that’s the line that says “SET @PeoplePhoneCursor = CURSOR FAST_FORWARD …

Simple Cursor Example : FORWARD_ONLY vs FAST FORWARD Read more »

Earlier in the week I added a blog entry on using the OUTPUT Clause on INSERT Statements, today I will expand it by exploring the use of the OUTPUT clause with UPDATE statements. Generally when you do an UPDATE statement you only get a row count returned, you don’t generally get a result set showing what was changed. With the OUTPUT clause …

TSQL OUTPUT Clause With UPDATE Statements Read more »

NTILE is a SQL Server function that can be called in a TSQL Query. This is part of the free sql query training to prepare for the Microsoft 70-461 queries exam. Here is a video presentation on using the TSQL NTILE function. And here is the sample code associated with the presentation. Feel free to copy and paste to SSMS …

TSQL Queries – Using NTILE Read more »