Am 15.02.2017 um 11:35 schrieb Heiko Schlittermann:
Vermutlich geht das mit Postgres, das werden wir sicher auch gleich
erfahren :)
Klar ;-)
test=*# select * from ronny ;
id | a | b | c | d
----+----+----+----+----
1 | 1 | 2 | 3 | 4
2 | 11 | 12 | 13 | 14
(2 Zeilen)
test=*# select foo.* from (select case when 2 > 1 then (select (a, b )
from ronny where id = 1) else (select (c ,d ) from ronny where id = 2)
end) foo;
row
-------
(1,2)
(1 Zeile)
test=*# select foo.* from (select case when 2 > 2 then (select (a, b)
from ronny where id = 1) else (select (c ,d ) from ronny where id = 2)
end) foo;
row
---------
(13,14)
(1 Zeile)
test=*#
Mal so als Schnellschuß...