select c1,c2, case when c3 = 0 then c5,c6,c7
else c8,c9,c10 end
from .....
Would you have any other command to perform the condition?
Thanks and T +
select c1,c2, case when c3 = 0 then c5,c6,c7
else c8,c9,c10 end
from .....
select c1,c2,c5,c6,c7 from .....
c3 <> 0
select c1,c2,c8,c9,c10 from .....
select c1,c2,
if c3=0
c4-c10 x,c5-c10 y
else
c4-c3 x,c5-c3 y
,c11,c12, --mais outras colunas...
from...
select c1
, c2
, c5 - c6 x
, c7 + c4 y
from .....
WHERE campo c3 = 0
UNION ALL
select c1
, c2
, c8 - c9 x
, c10 * c11 y
from .....
WHERE campo c3 <> 0 ;
Users browsing this forum: No registered users and 17 guests