-3
我需要使用SQL Server此連接:INNER JOIN在SQL Server
select dbo.CustomPermisionCntrs.CustomPermissionQty,
dbo.CustomPermisionCntrs.CustomPermissionWeight,
dbo.v_ExitPermitCntrs.LoadingQty,
dbo.v_ExitPermitCntrs.LoadingWeight,
dbo.v_ExitPermitCntrs.ExitDateTime,
dbo.v_ExitPermitCntrs.ExitPermitID,
dbo.v_ExitPermitCntrs.ExitPermitReceiptDate,
dbo.ExitPermit.ExitPermitType,
dbo.ManifestCntrs.CntrNo,
dbo.v_ManifestBLs.ConsigneeName,
dbo.v_ManifestBLs.BLNo,
dbo.v_ManifestBLs.BLID
from ((dbo.ExitPermit INNER JOIN dbo.v_ExitPermitCntrs ON dbo.ExitPermit.ExitPermitID = dbo.v_ExitPermitCntrs.ExitPermitID)
INNER JOIN dbo.CustomPermisionCntrs ON dbo.CustomPermisionCntrs.CustomPermissionCntrID = dbo.v_ExitPermitCntrs.CustomPermissionCntrID)
INNER JOIN(dbo.v_ManifestBLs INNER JOIN dbo.ManifestCntrs ON dbo.v_ManifestBLs.ManifestID = dbo.ManifestCntrs.ManifestID)
ON dbo.v_ManifestBLs.VoyageID = dbo.v_ExitPermitCntrs.VoyageID
但我的結果有很多重複的數據! 我如何改變連接來解決這個問題?
爲什麼使用2個不同的標籤,Mysql和sql-server? –