2017-09-24 1 views

Antwort

1

können Sie verwenden union all oder outer apply:

select t.entity, t.transtype, v.* 
from t outer apply 
    (values (100, S100, 0), (50, 0, S50)) v(denom, S100, S50); 
0

Eine einfache Lösung.

SELECT [Entity], [Trans Type], 100 [Denom], [S100], 0 [S50] 
FROM TheTable 
UNION ALL 
SELECT [Entity], [Trans Type], 50 [Denom], 0 [S100], [S50] 
FROM TheTable