我希望有人能幫助我。T-SQL視圖選擇FULL OUTER JOIN並在「A」基於「B」表添加其他行
我需要解決一個問題,在下面的場景中爲我提供正確的結果。
我有兩個表:Language
和ReportDescription
語言
Id Tag Description
---- ---- ----------------
1 en English
2 de German
3 fr French
4 it Italian
ReportDescription
LanguageId ReportId Description
---------- ----------- -------------------
1 1 Committee of (Eng)
2 1 Committee of (German)
3 1 Committee of (French)
4 1 Committee of (Ita)
1 2 Appointment of (Eng)
我想有結果將是:
LanguageId ReportId Description
---------- ----------- -------------------
1 1 Committee of (Eng)
2 1 Committee of (German)
3 1 Committee of (French)
4 1 Committee of (Ita)
1 2 Appointment of (Eng)
2 2 Appointment of (Eng)
3 2 Appointment of (Eng)
4 2 Appointment of (Eng)
任何幫助將不勝感激。
爲什麼結果有一行意大利語「預約(Eng)」? – Andomar 2010-01-24 11:46:45
如果您以散文形式描述您對結果集的描述,可能會有所幫助。現在我不太清楚...... – 2010-01-24 11:50:10
@Paul:同意。產生結果的邏輯是什麼3.至少有兩種方法可以做到這一點,但如果沒有邏輯,任何解決方案在其他情況下都失敗 – gbn 2010-01-24 13:36:23