0
を変換する必要があります:私は必要なものSQL、私は次のデータ・フォーマットを持つテーブルがあるのMicrosoft SQL Server 2014 で働いているテーブル
|customerId | action | amount | isSuccessful | paymentCount |
|____1____ |__ W__ |____10__|____0____ |_____2________|
|____1____ |__ D__ |____20__|____1____ |_____3________|
|____1____ |__ W__ |____30__|____1____ |_____1________|
|____1____ |__ D__ |____40__|____0____ |_____1________|
は、この形式でレポートを行うことです。
|customerId|depositAmount|withdrawalAmount|depositAttemptCount|withdrawalAttemptCount|
|____1____ |______20 ____|________30_____ |________4_______ _|________3__________ |
selectを使用してテーブルを変換する方法はありますか?
私は助けていただきありがとうございます。
はこちらをご覧: http://stackoverflow.com/questions/15931607/convert-rows-to-columns-using-pivot-in-sql -server – IngoB