Tag Archives: T-SQL

A Busy Few Years

Last week on Twitter, a friend mentioned they were submitting to the PASS Summit and went through their previous speaking engagements. This person noted they had done over 40 talks in the last few years, which is a lot. I … Continue reading

Posted in Blog | Tagged , , | 2 Comments

Limiting the Max–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I was chatting with someone the other day about MAX() and how it can work within a set of … Continue reading

Posted in Blog | Tagged , , | Leave a comment

Watch Your DataTypes in Aggregates–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I’ve got a database of NBA statistics with data like this for players. I downloaded a CSV and loaded … Continue reading

Posted in Blog | Tagged , , | Leave a comment

Implicit Time Conversions – #SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I was trying to work with times recently and needed to get the current time. I thought, well, Getdate(), … Continue reading

Posted in Blog | Tagged , , | Leave a comment

Writing the Correct Query is Important

There’s a saying in the data world: garbage in, garbage out. We use that when we can’t get good information from our database because the data we’ve stored isn’t as useful as we would like. That’s a problem, and it’s … Continue reading

Posted in Editorial | Tagged , ,

Quick Prompt Tips–Custom Procedure Templates

One of the things that I often do is create stored procedures. The syntax for doing so is simple, but it has a number of items that need to be included. SQL Prompt makes this much quicker with the “cp” … Continue reading

Posted in Blog | Tagged , , ,

Be Careful of Your Create Stored Procedure Batch

I was rehearsing a demo with someone recently and we had some stored procedure code that looked like this: CREATE PROCEDURE UpdateEmpID @empid INT AS BEGIN UPDATE  dbo.Employees SET empid = 3 WHERE  empid = @empid ; END However, this … Continue reading

Posted in Blog | Tagged ,

Finally, Create or Alter

There are lots of reasons to upgrade to SQL Server 2016, but this is the one for me. We finally get a CREATE OR ALTER statement in T-SQL. This not only makes lots of code easier to write, it means … Continue reading

Posted in Editorial | Tagged , | 2 Comments

#SQLNewBlogger – T-SQL ESCAPE for Wildcards

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I ran into a really interesting issue recently. I was working with a table and wanted to determine if … Continue reading

Posted in Blog | Tagged , , | 1 Comment

The GUI Helps Build SQL Prompt Snippets

SQL Prompt is an amazing tool for writing T-SQL. It helps you to concentrate on your code, without having to go off and examine Books Online or other documentation, or even worry about formatting. One of the keys to making … Continue reading

Posted in Blog | Tagged , , ,