Good Basic T-SQL Exercises

  • Jeff Moden (11/19/2015)


    Ed Wagner (11/19/2015)


    Jeff Moden (11/19/2015)


    Steve Jones - SSC Editor (11/19/2015)


    Here, though not sure how/why/when. I am trying to get some POC together that could be used to help people walk a path, but be easy to evolve and grow over time.

    Sounds like the beginning of an interesting project.

    This does sound like it could be interesting. Do you mean something like a stairway series of miniature articles that get deeper and deeper as they go?

    Yes and no. Each article could stand alone or build on previous articles but all in a very "SQL Spackle" fashion.

    Okay, that definitely sounds interesting. I really like the SQL Spackle stuff.

  • Can't you just use:

    RIGHT('00' + @col, 2) ??

  • AlanDNelson (11/20/2015)


    Can't you just use:

    RIGHT('00' + @col, 2) ??

    I assume you are responding to the person who injected their question into the middle of this thread. That person took Jeff's advice and created a new question for their problem and it was answered much like you said above.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Jeff Moden (11/19/2015)


    Steve Jones - SSC Editor (11/19/2015)


    Here, though not sure how/why/when. I am trying to get some POC together that could be used to help people walk a path, but be easy to evolve and grow over time.

    Sounds like the beginning of an interesting project.

    I think you volunteered to help me. Thanks for that.

  • Steve Jones - SSC Editor (11/21/2015)


    Jeff Moden (11/19/2015)


    Steve Jones - SSC Editor (11/19/2015)


    Here, though not sure how/why/when. I am trying to get some POC together that could be used to help people walk a path, but be easy to evolve and grow over time.

    Sounds like the beginning of an interesting project.

    I think you volunteered to help me. Thanks for that.

    You thought correctly.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • you guys are killing me with questions and not t-sql problems. :w00t:

    The short answer: I don't know what to do.

    Longer answer: Some way to help people learn. Some places I've been experimenting with to see what might be a good set of learning techniques.

    exercism.io

    bimlscript[/url]

    99 Scala Problems[/url]

  • Steve Jones - SSC Editor (11/21/2015)


    you guys are killing me with questions and not t-sql problems. :w00t:

    That's because T-SQL isn't a problem. 😛

    I think we need to get a couple of other people involved, at least as sanity checkers, and maybe start a new category on the left side called "Excercises". Not sure if you can have sublinks in that for "Beginner", "Intermediate", "Advanced", and "Ninja". Of course, that's just a suggestion.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I keep trying to write an exercise or two but I keep coming up with things that are already in many of the articles, thanks to the people that post test data generators along with their article.

    Perhaps what needs to be done is to scan through the articles that do such things and post them in an "Exercises" listing at the left instead of redeveloping the wheel.

    I'm also thinking that anything else is very well covered in the "Stairways".

    Based on a great many of the questions over the last dozen years, perhaps a course on how to Google something concerning SQL Server and T-SQL would be more fruitful. 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • The problem is that for many people, it's hard to organize their learning. They can't read every article. They might have been a member for a few months, or a year. they miss out on many of the pieces. If there are exercises in the articles, that's fine. We can re-use those, but I need a way to organize and put some of these together. I want to give people a set of problems they can work on to slowly improve their skills.

Viewing 9 posts - 16 through 23 (of 23 total)

You must be logged in to reply to this topic. Login to reply