的問題是在我的select語句:
SELECT
Kolonminhas.KolonminhaID
,Kolonminhas.KolonID AS [Kolonminhas KolonID]
,Kolonminhas.Aciklama
,Kolonminhas.En AS [Kolonminhas En]
,Kolonminhas.Boy AS [Kolonminhas Boy]
,Kats.KatID AS [Kats KatID]
,Kats.BlokID AS [Kats BlokID]
,Kats.Ad AS [Kats Ad]
,Kats.Kolonaltkot
,Kats.Kolonustkot
,Bloks.BlokID AS [Bloks BlokID]
,Bloks.ProjectID
,Bloks.Ad AS [Bloks Ad]
,Kolons.KolonID AS [Kolons KolonID]
,Kolons.KatID AS [Kolons KatID]
,Kolons.KolonAdi
,Kolons.En AS [Kolons En]
,Kolons.Boy AS [Kolons Boy]
,Kolons.Yukseklik
,Kolons.Altkot
,Kolons.UstKot
FROM
Kolons
INNER JOIN Kolonminhas
ON Kolons.KolonID = Kolonminhas.KolonID
INNER JOIN Kats
ON Kolons.KatID = Kats.KatID
INNER JOIN Bloks
ON Kats.BlokID = Bloks.BlokID
爲了解決這個問題OUTER JOIN應使用命令。但是我無法創建一個。如果有人幫助我,我將不勝感激。
這是正確的查詢:
SELECT
Kolonminhas.KolonminhaID
,Kolonminhas.KolonID AS [Kolonminhas KolonID]
,Kolonminhas.Aciklama
,Kolonminhas.En AS [Kolonminhas En]
,Kolonminhas.Boy AS [Kolonminhas Boy]
,Kats.KatID AS [Kats KatID]
,Kats.BlokID AS [Kats BlokID]
,Kats.Ad AS [Kats Ad]
,Kats.Kolonaltkot
,Kats.Kolonustkot
,Bloks.BlokID AS [Bloks BlokID]
,Bloks.ProjectID
,Bloks.Ad AS [Bloks Ad]
,Kolons.KolonID AS [Kolons KolonID]
,Kolons.KatID AS [Kolons KatID]
,Kolons.KolonAdi
,Kolons.En AS [Kolons En]
,Kolons.Boy AS [Kolons Boy]
,Kolons.Yukseklik
,Kolons.Altkot
,Kolons.UstKot
from Bloks
left join (Kats left join (Kolons left join Kolonminhas on Kolons.KolonID = Kolonminhas.KolonID) ON Kats.KatID = Kolons.KatID) ON Bloks.BlokID = Kats.BlokID