Author Topic: Is JOIN by CASE possible?  (Read 234 times)

0 Members and 1 Guest are viewing this topic.

Offline PnzrDrgoonTopic starter

  • Irregular
  • Posts: 11
  • Gender: Male
    • View Profile
Is JOIN by CASE possible?
« on: June 16, 2010, 02:34:05 PM »
Is it possible to do the following?

Code: [Select]
SELECT `a`.`f1`,`a`.`f2`,`b`.`f3`, `s`.`f4`
FROM `a`
CASE `a`.`f1`
WHEN 1 THEN INNER JOIN `b` ON `a`.`fx`=`b`.`fz`
ELSE
INNER JOIN `c` AS `s` ON `a`.`fx`=`s`.`fz`

Offline ignace

  • Guru
  • Freak!
  • *
  • Posts: 5,093
  • Gender: Male
    • View Profile
Re: Is JOIN by CASE possible?
« Reply #1 on: June 16, 2010, 02:39:01 PM »
No. But following the logic, you are after a LEFT OUT JOIN
Developer from Belgium, Vlaams-Brabant