Some useful bits and pieces I've come across for using SQL, mostly the Teradata variant.
Explains how to use SQL to check if a table already exists. Very useful to check prior to dropping a table, or for volatile tables if you re-run SQL.
This one came about because a set of data I was dealing with had UK postcodes in it. The data came in from a whole variety of sources, and a
OK, this one is fairly basic for anyone who regularly uses SQL, but it's a neat trick if you're not familiar with it. Normally when you crea
If your reading a lot of records from a database and you need to find the first or last record in a sequence, you can do this in MS SQL by u