We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
When I ran this it failed with the following error:
"Msg 105, Level 15, State 1, Server WIN-ILO9GLLB9J0, Line 2
Unclosed quotation mark after the character string '[a, e, i, o, u]%;
go
'.
Msg 102, Level 15, State 1, Server WIN-ILO9GLLB9J0, Line 2
Incorrect syntax near '[a, e, i, o, u]%;
go
'. "
However, it worked when I ran:
SELECT DISTINCT city FROM station
WHERE city LIKE 'a%'
OR city LIKE 'e%'
OR city LIKE 'i%'
OR city LIKE 'o%'
OR city LIKE 'u%';
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 6
You are viewing a single comment's thread. Return to all comments →
When I ran this it failed with the following error:
"Msg 105, Level 15, State 1, Server WIN-ILO9GLLB9J0, Line 2 Unclosed quotation mark after the character string '[a, e, i, o, u]%; go '. Msg 102, Level 15, State 1, Server WIN-ILO9GLLB9J0, Line 2 Incorrect syntax near '[a, e, i, o, u]%; go '. "
However, it worked when I ran:
SELECT DISTINCT city FROM station WHERE city LIKE 'a%' OR city LIKE 'e%' OR city LIKE 'i%' OR city LIKE 'o%' OR city LIKE 'u%';