Select
r.Id,
r.Date,
r.Position.Lat Lat,
r.Position.Long Lng,
r.DriverId,
r.VehicleId,
--IsNull(t.DriverId, r.DriverId) DriverId,
--v.Name GroupName,
l.Name LayerName
From
Operation.vw_AllRecord as r --The View
Inner Join @entityIds Ids
On Ids.Id = r.VehicleId
Inner Join @LayerPointCache l
ON r.Position.Lat Between MinY
And MaxY And r.Position.Long Between MinX And MaxX
Where
r.Date Between @StartDate And @EndDate And
r.HasPosition = 1
此行有错误
ON r.Position.Lat Between MinY And MaxY And r.Position.Long Between MinX And MaxX
说:
无法在 varbinary 上调用方法
请注意,这Operation.vw_AllRecord
是一个视图