2 つの結合されたテーブルの結果である次の結果セットがあり、サブクエリを使用して結果の方向を変更したいと考えています。これは、動的なレコード数である現在の結果セットの例です。
Forename Surname Subject Result
Mercury Freddie English C
Mercury Freddie Mathematics D
Simon Paul English E
Simon Paul Mathematics F
Garfunkle Art English A
Garfunkle Art Mathematics B
これが私が達成したいことです:
Forename Surname English Mathematics
Mercury Freddie C D
Simon Paul E F
Garfunkle Art A B
ケースステートメントを使用して入力しようとしましたが、結果は次のようになります。
Forename Surname English Mathematics
Mercury Freddie NULL
Simon Paul NULL
Garfunkle Art NULL
Mercury Freddie C NULL
Simon Paul E NULL
Garfunkle Art A NULL