Quite often, when writing queries, we want to load a table with a condition we want to pass to it (rather than hard-coding the value in the WHERE clause). Eg, load sales for a given year.
This can be easily achieved by creating a Macro, and passing a value to it…Read More
In this post, I want to cover off a little bit of RANK() usage in SQL, but then focus on how to use ranking to get a unique rank number for each row. I will cover both SQL Server and Teradata. RANK() is pretty simple to use, and works pretty much the same way inRead More
Nice simple one today. The first thing you should ever do when granted access to any system, is change your password! Afterall, your IT policy probably a) requires you to and b) will hold you accountable for any misuse under your ID! This is simple in Teradata – you log in using your existing password,Read More
Update – December 2016 I wrote this article back in 2013, based on my current experiences working between SQL Server & Teradata. With the benefit of time (and learning more!), there are probably better ways I could have achieved what I’ve outlined below. Most notably using Integration Services. That said, it was a good learning experience,Read More
In this post, I’m going to talk about finding the difference between 2 dates in SQL. However, I’m going to cover it across multiple applications. The Problem Statement is simple: How many days are there between two dates? What we want is an integer value back of how many days there are. The solution willRead More