在比較具有方括號的資料時,例如:'-[VVE172BUS-3.30]-' 我在下面使用
Select * from ServerOps.dbo.tbl_VmHealth_Firmware where biosname like '-[[]VVE172BUS-3.30]-'
而且我得到了正確的結果,但是我需要將 biosname '-[VVE172BUS-3.30]-' 與不同表中的另一列進行比較。你能幫我在加入兩列時如何逃脫[]
SELECT VmhostName, ParentName, DataCenterName,VcenterName,
VF.Manufacturer, VF.Model, VF.BiosVersion, MAX(VF.ReleaseId) AS ReleaseId
FROM ServerOps.dbo.tbl_VmHealth_Vmhost VH WITH (NOLOCK)
LEFT JOIN ServerOps.dbo.tbl_VmHealth_Firmware VF WITH (NOLOCK)
ON VH.Manufacturer LIKE '%' VF.Manufacturer '%' AND VH.Model = VF.Model
AND VH.BiosVersion LIKE '%' VF.BiosVersion '%'
AND ((VH.ReleaseDate >= VF.ReleaseDate AND VH.Manufacturer not like '
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/453574.html
