交叉表二
-------------------
SELECT *
FROM crosstab(
'select currency, currType, purpose, rate From exgRate',
'Select distinct purpose from exgRate' )
AS t(
currency char(3),
currType varchar(10),
"買入" numeric(18,6),
"賣出" numeric(18,6)
) order by currType, currency
看起來,資料表還需要進一步的資料整理,不過功能是OK了
沒有留言:
張貼留言