Stupid SQL mistakes – more from the land of application support

Here’s a lovely little one that just took me much to long, probably because I’m tired, or having an off day or something:

Select [Name]
         [Surname],
         [Address],
         [Telephone],
         [Email]
From ATableAboutPeople

See, the error isn’t obvious, because the SQL compiles and runs, but the result set just doesn’t bring back what you expect…..because [Name] is now aliased as [Surname] – all because of a missing comma.

Hate it when that happens.