Michael J. Swart

April 29, 2008

SQL Poetry

Filed under: Tongue In Cheek — Tags: , — Michael J. Swart @ 6:52 am

Probably one of the geekiest things I’ve ever done.

Take a list of SQL Server keywords. Stick the words in a database
table along with it’s meter and rhyme. Get SQL Server to cross join
this table to itself concatenate meter and output candidate lines of
poetry. Select and arrange according to rhyme:

ALTER PROCEDURE, CONTINUE, IGNORE,
money and smallmoney, AFTER, BEFORE,
INDEXKEY_PROPERTY, CAST and CONVERT,
GROUP BY, IDENTITY (Function), DEFERRED,
BACKUP, nchar and nvarchar, COMPUTE,
EXECUTE, UPDATE STATISTICS, INCLUDE,
datetime and smalldatetime, ISNULL, ROUTINE,
ROLLBACK TRANSACTION, IS_MEMBER, BETWEEN

Things I’ve noticed.
1) This must be what Vogon poetry is like.
2) Statistics is a word that should never show up in any poem
anywhere.

Powered by WordPress