| NumberOfQuotesGenerated | 11
|
TotalAmountOfQuotes | 78100
|
NumberOfInvoiceGenerated | 9
|
TotalAmountOfInvoice | 8222
提前谢谢
答案 0 :(得分:1)
您可以尝试Unpivot
语法,如下所示
-- create table t(NumberOfQuotesGenerated int,TotalAmountOfQuotes int,NumberOfInvoiceGenerated int, TotalAmountOfInvoice int)
-- insert into t values (11, 78100, 9, 8222)
select * from
(select * from t) s
unpivot
(
data for
colname in
([NumberOfQuotesGenerated],[TotalAmountOfQuotes],[NumberOfInvoiceGenerated],[TotalAmountOfInvoice])
)up
<强> Live SQL demo 强>