• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • An SQL Pivot Procedure

    April 21, 2015 Paul Tuohy

    The basic concept of a pivot is that row values are transformed into column values. I have often wished that DB2 had a pivot procedure. But until that day arrives I will have to make do with a workaround that you might find useful too.

    The workaround is in the form of a stored procedure that can be used to pivot any column in any table. Before getting to the stored procedure, let’s look at a simple pivot example.

    These examples are using the SALES table in the DB2 sample database. To create the DB2 sample database on your system,

    …

    Read more
  • Joining On Ranges

    April 21, 2015 Ted Holt

    People are ingenious. Where there’s a need, they find a way. Unfortunately, some of the ways they find don’t jibe well with relational databases, which makes my work life messy. Fortunately, I know a few ways to clean it up, and here’s one of them.

    Suppose you work for a company that sells office supplies. One day someone walks into your office and asks for a report of sales of boxes. “Sure thing!” you reply. “How do I know that an item is a box?”

    “Easy,” he replies. “The item number begins with 134.”

    Easy, indeed.

    select ItemNumber, Description
      from 
    …

    Read more
  • Ruby And DSLs And Blocks

    April 21, 2015 Aaron Bartell

    When I started with Ruby I was immediately drawn in by its syntax–simple, elegant, and easy to peruse. At the time I didn’t know this was an intentional mantra of the language put in place by Yukihiro “Matz” Matsumoto, Ruby’s creator. Matz said that he was “trying to make Ruby natural, not simple,” in a way that mirrors life. Further, Matz stated “Ruby is simple in appearance, but is very complex inside, just like our human body.” Let’s take this out of metaphor-land and into tangible code by introducing the DSL, or Domain Specific Language, aspect of Ruby.

    First, what

    …

    Read more

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • IBM Tweaks Some Power Systems Prices Down, Others Up
  • Disaster Recovery: From OS/400 V5R3 To IBM i 7.4 In 36 Hours
  • The Disconnect In Modernization Planning And Execution
  • Superior Support: One Of The Reasons You Pay The Power Systems Premium
  • IBM i PTF Guide, Volume 25, Number 13
  • IBM i Has a Future ‘If Kept Up To Date,’ IDC Says
  • When You Need Us, We Are Ready To Do Grunt Work
  • Generative AI: Coming to an ERP Near You
  • Four Hundred Monitor, March 22
  • IBM i PTF Guide, Volume 25, Number 12

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2023 IT Jungle