You are viewing a single comment's thread. Return to all comments →
in MS SQL SERVER: why does this work:
select top 1 city, len(city) as short_len from station order by short_len, city asc; select top 1 city, len(city) as long_len from station order by long_len desc;
and not this:
(select top 1 city, len(city) as short_len from station order by short_len, city asc) union (select top 1 city, len(city) as long_len from station order by long_len desc);
I get this Runtime Error:
Msg 156, Level 15, State 1, Server dbrank-tsql, Line 6 Incorrect syntax near the keyword 'order'. Msg 156, Level 15, State 1, Server dbrank-tsql, Line 8 Incorrect syntax near the keyword 'order'.
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 5
You are viewing a single comment's thread. Return to all comments →
in MS SQL SERVER:
why does this work:
and not this:
I get this Runtime Error: