SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

The Voice of the DBA

Steve Jones is the editor of SQLServerCentral.com and visits a wide variety of data related topics in his daily editorial. Steve has spent years working as a DBA and general purpose Windows administrator, primarily working with SQL Server since it was ported from Sybase in 1990. You can follow Steve on Twitter at twitter.com/way0utwest

FizzBuzz–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. This is also a part of a basic series on git and how to use it.

There’s been a programmer test that was used for awhile to see if a simple program could be constructed. It’s FizzBuzz, after a kids game, and designed to see if someone knows some logical program construction.

The test is to produce a list from 1 to 100 and for multiples of 3, write “Fizz”, multiples of 5 produce “Buzz” and multiples of both produce “FizzBuzz”. This means you get:

2017-07-06 10_18_44-SQLQuery1.sql - (local)_SQL2016.WideWorldImporters-RR (PLATO_Steve (64))_ - Micr

It’s a simple test, but I wonder how long it would take you to write it in T-SQL? It took me about 2 minutes.

Give yourself a little quiz today. For a challenge, also produce this in PoSh or some other language. I took about 5 minutes in PoSh, mostly because I had to look up some syntax.

In case you think this doesn’t matter, I agree with Jeff Atwood. I’d like to look at someone’s code before I interview them for development. They should have some public code, maybe something they recommend.

SQLNewBlogger

If you’re looking for a blog topic, show us you can write this code.


Filed under: Blog Tagged: SQLNewBlogger, syndicated, T-SQL

Comments

Leave a comment on the original post [voiceofthedba.com, opens in a new window]

Loading comments...