Hi everybody!
I am truing to concstruct something like this:
SELECT id, name, role,
CASE
WHEN role = 1 THEN SELECT item1, item2, item3 FROM table1
WHEN role = 2 THEN SELECT item1, item2, item3 FROM table2
ELSE SELECT item1, item2, item3 FROM table3
END as THIS, THAT, THOSE
FROM roles_tbl
Is this is valid in any DB2 VERSIONS
--
Message posted via http://www.dbmonster.com
I am truing to concstruct something like this:
SELECT id, name, role,
CASE
WHEN role = 1 THEN SELECT item1, item2, item3 FROM table1
WHEN role = 2 THEN SELECT item1, item2, item3 FROM table2
ELSE SELECT item1, item2, item3 FROM table3
END as THIS, THAT, THOSE
FROM roles_tbl
Is this is valid in any DB2 VERSIONS
--
Message posted via http://www.dbmonster.com
Comment