문제

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

Write error Incorrect syntax near ')'. Incorrect syntax near the keyword 'as'.

도움이 되었습니까?

해결책

Missing "Select"??

outer apply 
( 
SELECT 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

Raj

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top