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.
Hey sudhansusekhar_1!
I solved this problem using RIGHT() function and it's working:
SELECT Name FROM STUDENTS
WHERE Marks > 75 ORDER BY RIGHT(Name, 3), ID;
But after approchaing the problem using SUBSTR/SUBSTRING I'm getting following error:
1. SQL0138N A numeric argument of a built-in string function is out of range.
2. SQLSTATE=22011
I'm unable to solve this error so please could you help me with this.
Thank you!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Higher Than 75 Marks
You are viewing a single comment's thread. Return to all comments →
Hey sudhansusekhar_1! I solved this problem using RIGHT() function and it's working:
SELECT Name FROM STUDENTS WHERE Marks > 75 ORDER BY RIGHT(Name, 3), ID;
But after approchaing the problem using SUBSTR/SUBSTRING I'm getting following error: 1. SQL0138N A numeric argument of a built-in string function is out of range. 2. SQLSTATE=22011
I'm unable to solve this error so please could you help me with this. Thank you!