Hi Roland.
What I tried to do is a little bit strange and may not be a solution for you.
In SQL Anywhere it works.
// Case 1
case
when 1 = 0 then
select 100 from dummy
else
select 'a' as a1 from dummy where a1 = 'a1'
end;
// Case 2
case
when 0 = 0 then
select 100 from dummy
else
select 'a' as a1 from dummy where a1 = 'a1'
end;
The idea is to check the value (as an argument) instead of 1 = 0 or 0 = 0... Don't know what database you use so cannot write something that would work for sure.
But the queries I wrote return different value depending of when...
Andreas.
Andreas.