Weather Observation Station 5

  • + 0 comments

    Can Anybody explain why I am getting error like this while running the below code """" select * from (select TOP 1 CITY,len(CITY) from STATION ORDER BY len(CITY),CITY) UNION select * from (select TOP 1 CITY,len(CITY) from STATION ORDER BY len(CITY) DESC,CITY ASC);

    """" ERROR: Msg 156, Level 15, State 1, Server dbrank-tsql, Line 6 Incorrect syntax near the keyword 'UNION'. Msg 102, Level 15, State 1, Server dbrank-tsql, Line 6 Incorrect syntax near ';'.