Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dws (341)

  (email not shown publicly)

Journal of dws (341)

Saturday February 12, 2005
11:53 PM

That other kind of JOIN

[ #23167 ]

I've been doing database-related work for most of the last 15+ years, yet last week was only the second time I've needed to use a FULL OUTER JOIN in production code.

We use LEFT JOIN as an interview question to gauge a candidate's knowledge of SQL, but this was one of those "we may get some from here, we may get some from there, but we need to count either as one" situations (with a few twists) were a LEFT JOIN wasn't sufficient, and I didn't want to introduce additional queries into this particular piece of code. As Holmes would say, it was a "three pipe problem." Nailing it was the high point to an otherwise good week.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • One does wonder whether the requirements are sensible when a FULL OUTTER JOIN is the correct answer, but I do understand the pleasure in finding the solution. About once a decade I use actual precondition/invariant/postcondition code-proof "in anger" because the loop isn't debuggable in practice. It feels good, but I wouldn't want to do it every day.
    # I had a sig when sigs were cool
    use Sig;