sql server - mssql isnull don't work in outer apply -
outer apply ( isnull( (select top 1 sea.daily, sea.seasonid season sea sea.propertyid = prop.propertyid , fromdate < @fromdate , todate > @todate ), (select top 1 sea.daily, sea.seasonid season sea sea.propertyid = prop.propertyid) ) ) pri
write error incorrect syntax near ')'. incorrect syntax near keyword 'as'.
missing "select"??
outer apply ( select isnull( (select top 1 sea.daily, sea.seasonid season sea sea.propertyid = prop.propertyid , fromdate < @fromdate , todate > @todate ), (select top 1 sea.daily, sea.seasonid season sea sea.propertyid = prop.propertyid) ) ) pri
raj
Comments
Post a Comment