IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Incidentally, yes
Multiple left join to the same table, and a big case statement in the field list that will return a flag indicating which of the joins actually had a match. Would have been so much easier with a subselct or stored procedure, but hey, we're a MySQL shop here.
===

Implicitly condoning stupidity since 2001.
New A real pain, innit?
I have a couple of "disaster queries" with that requirement. I build them up with lots of interpolation so that as conditions change, I am sure that they change the same way in the WHERE, a CASE statement in the SELECT, and the corresponding CASE statement in the GROUP BY. :-(

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Nah, the *real* pain is ...
The one with a table left joined to itself multiple times, and a triple-nested CASE in the field list. Don't even ask why.
===

Implicitly condoning stupidity since 2001.
New I won't...
I'll just comment that with a sane table design, there should be no reason to ever go there. (Of course I know how the real world works...)

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
     select unique in oracle same as select distinct in postgres? -NT - (tuberculosis) - (9)
         Yes. - (admin) - (1)
             I didn't even know there WAS a "SELECT UNIQUE" in Oracle... -NT - (CRConrad)
         No - (ben_tilly) - (6)
             Can we get our stories straight :-) ? - (tuberculosis) - (5)
                 I don't remember the exact bug - (ben_tilly) - (4)
                     Incidentally, yes - (drewk) - (3)
                         A real pain, innit? - (ben_tilly) - (2)
                             Nah, the *real* pain is ... - (drewk) - (1)
                                 I won't... - (ben_tilly)

Only a Stephen Hawking vs. Larry Flynt joust could compare in terms of universal significance.
76 ms