outer apply
(
isnull(
(select top 1
sea.Daily,
sea.SeasonId
from Season as sea
where sea.propertyId = prop.PropertyId and FromDate < @FromDate and ToDate > @ToDate
),
(select top 1 sea.Daily,
sea.SeasonId
from Season as sea where sea.propertyId = prop.PropertyId)
)
) as pri
書き込みエラー ')' 付近の構文が正しくありません。キーワード「as」付近の構文が正しくありません。