SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

Learning through Puzzles

A few years ago I ran across the Advent of Code challenge. It's an interesting set of puzzles that you are asked to solve. Most are at a scale that wouldn't be practical to solve manually. Once you solve a puzzle, there is usually a second part that's unlocked (you must put in the solution) and then your progress is tracked on the site. A new puzzle is released every day leading up to Christmas, but you can skip around and solve puzzles as you like after that. I had fun in 2016 working through puzzles in T-SQL, PoSh, and Python. I need to go back and work the 2017 items.

Recently I was trying to brush up on some Python skills and ran across the PythonHow challenge. Before going on to rework some exercises and coursework, I decided to see what I remembered. The  puzzles are easy, but one leads you to the next. In other words, you start with pythonhow.com/start, when you solve the puzzle, you get a letter, say "r" (that's not right). You change the URL to pythonhow.com/r/ and you get the next challenge.

That's a neat way to get build a flow. I could imagine that as a way of teaching someone new skills. Maybe you want to help someone learn R (currently our Wednesday Questions of the Day) or window functions. Give them a problem, and once they solve it, the answer leads them to the next puzzle. A puzzle game, but one that paces you according to your understanding of a topic.

I wonder how many people might like learning like this, or perhaps might be frustrated when they can't solve something. Maybe this is a nice addition to something like a Stairway Series, giving readers a chance to practice skills. Do you think this is a good idea? Not a super hard, challenge the experts, but maybe a way to help those that are beginners or intermediate SQL people learn to code better.

Maybe some of you would like to build some small puzzles in T-SQL that we could link together? This might be a fun way to set up a T-SQL Advent calendar one year.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.0MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT
Foundry

How might classification and better documentation improve data safety?

SQL Atlas is the latest prototype to come from the Redgate Foundry - find out more about what the tool does and try out the interactive demo for yourself. Try the free prototype

SQL Prompt

Write, format, and refactor SQL effortlessly with SQL Prompt

Writing SQL is 50% faster with SQL Prompt. Your SQL code can be formatted just the way you like it, you can create and share snippets with your team, and with tab coloring you’ll never deploy to the wrong environment again. Download your free trial

Featured Contents

 

Dynamic Pivot, Passing Temp Table Variables to Dynamic SQL

Jambu Krishnamurthy from SQLServerCentral.com

This example demonstrates how to perform a pivot using dynamic headers based on the row values of a table. The article also shows how to pass a temp table variable to a Dynamic SQL call. More »


 

Developing Metadata Design Patterns in BIML

Additional Articles from SimpleTalk

You may have already experienced ETL Hell, where you have a large number of similar of SSIS tasks, and a small change, such as an alteration to the network topology, means that they all need to be altered with the correct connection details. Perhaps you should consider creating design patterns for all the standard components of integration tasks in BIML, and generating the SSIS packages from these? Amarendra walks you through the process. More »


 

From the SQLServerCentral Blogs - SQL Puzzle 2: Eight Queens

matthew.mcgiffen 73574 from SQLServerCentral Blogs

This puzzle was first proposed in 1848 by a composer of chess puzzles called Max Bezzel and has since spawned... More »


 

From the SQLServerCentral Blogs - SQL Server 2017 RC1 is Here

Steve Jones from SQLServerCentral Blogs

And I’ve got it. Glenn Berry posted a a link to the MSDN blog and almost immediately a note that the... More »

Question of the Day

Today's Question (by Steve Jones):

When I create a table in an Azure SQL Data Warehouse, I can set the distribution of my data. What are the options I can use in the WITH (DISTRIBUTION = X) clause?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Azure SQL Data Warehouse (ASDW).

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

T-SQL Querying (Developer Reference)

Squeeze maximum performance and efficiency from every T-SQL query you write or tune. Four leading experts take an in-depth look at T-SQL’s internal architecture and offer advanced practical techniques for optimizing response time and resource usage. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

What does @@IO_BUSY return?

Answer: The number of ticks since the last restart spent on IO operations

Explanation:

If you run 

 select @@IO_BUSY

you get the number of ticks that have been spend on IO operations since the last server restart.

Ref: @@IO_BUSY - click here


» Discuss this question and answer on the forums

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Administration

Best way to encrypt credit card information? - Hello, We have a payments table that is populated when a user buys something from our website.  The credit card is...

Advanced Analytics Extensions -


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Need help in SQL table for updating NULLS -

Changing type from INT to BIGINT why so slow? - I was hoping SQL Server 2016 could handle change in types. With this table of numbers it takes an age to...

Cursor Performance - OK so we have an application that has gone through an upgrade which also saw the database move from a...


SQL Server 2014 : Administration - SQL Server 2014

AlwaysOn Backups on Secondaries - Hi All In an AlwaysOn environment, I understand that FULL backups can be offloaded onto my secondary replica and I believe...

Read Access to Database Tables - How do you do it in MS-SQL ? - Hi all, I need to control access to the developers&business users whom (by business rules) are allow to look into certain...


SQL Server 2014 : Development - SQL Server 2014

Getting rid of duplicate records - Hi All, I have a table that stores schedule events. One event can be scheduled more than one time in one...

How to find row(s) with the same value in a recordset - Hi, I got this query, that gives me all the products(optionid) that are ready to be shipped: SELECT T_Order_Detail.OrderID,    T_Order_Detail.OptionID,    T_Order_Detail.Quantity FROM...


SQL Server 2012 : SQL 2012 - General

Timeouts Popping Up for Production Database - Exceptions - timeout and connection pool errors are starting to appear in a database for a web application which accesses its...

SQL Server 2012 Exam 70-462 practice questions - Hi guys, I'm currently studying for the 70-462 exam using the Administering Microsoft® SQL Sever® 2012 Databases. i have been through...


SQL Server 2012 : SQL Server 2012 - T-SQL

Update NULL values - SQL Help - Hello Everyone,  Need some help in updating one column, I come up with some sample data. Create Table #ACC (Flag Varchar(1), Period...


SQL Server vNext : SQL Server 14 - Administration

Login error - The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452) - Hi All, I am getting below error while trying to connect SQL from remote server. Local login is working fine. Can...


SQL Server 2008 : SQL Server 2008 - General

Are these both same? Begin Tran & Begin Try - My goal here is i delete only data that is inserted, if i only inserted and not able to delete...

Stats Update - Hi All, Question regarding manually updating the statistics. I have auto updates stats enabled but noticed the stats become stale very...


Reporting Services : SSRS 2016

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' - Hi guys I have installed SQL Server 2016 development edition with CU3 including SQL Database Engine, SSRS, SSAS, SSIS all on...

SSRS Report Descriptions Query - Hi In SSRS 2016 is there a way to add a description to the report before it gets deployed so that...


Programming : General

Date Range in Table A also contained in Table B - Table A: Has a start date and an end date in it, for example, 01/01/2017 and 12/31/2017. Table B: Also has date ranges...


Programming : Powershell

Help me hate PowerShell a little less, please. - I found an interesting and useful PoSh script at the following URL: http://woshub.com/get-adcomputer-getting-active-directory-computers-info-via-powershell/ Here's the script that I got directly from that...


Data Warehousing : Integration Services

How to access another server temp table without any Linked server - Hi All,                I have a requirement where #temp table is available in one server lets say "A" and I need...

This email has been sent to [email protected]. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the [email protected].
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]