[SOLVED] SQL doesn't accept lower case answer?
Hello, this is under SQL and when I tried to run the test cases and they failed. The things I spotted different from my output and the correct output is mine are all lower case For example mine is 'broccoli soup' while the expected output is 'Broccoli Soup', may I know if anyone encountered this and how did you fix? Thank you very much!
5/1/2021 2:57:05 AMLê Hữu Gia Nghi
33 AnswersNew Answer
I’m angry about the same problem
I think we can consider this a bug in the test data. I have reported it via in-app feedback, we can only hope SL fix it at some point. There is no simple way to convert the string to Title Case, certainly not beginner level.
Lê Hữu Gia Nghi, Tibor Santa I'm not 100% familiar with the particular problem that's being spoken about. Nevertheless, I'm going to go by what's being said and attempt to wing it anyway. Would the logic noted in the code below not be helpful with what you're/she's trying to do? https://code.sololearn.com/cL68j1V9JkdZ
Tibor Santa I guess it was a good thing that I opened with those first couple of sentences in my answer then, eh?
Actually, SQL is case insensitive language so we can use both lower & upper case . But in sololearn it may be followed due to it is not completely SQL server.. Lê Hữu Gia Nghi Mail to the sololearn.
Lê Hữu Gia Nghi In starting when they have introduced SQL course then everything was working fine but now our completed task is also not working.
You can use the InitCap() function to pass in arguments. SELECT InitCap(firstname) AS firstname, grade FROM students WHERE grade >= 88
hhello, thanks for your answer, I agree that sql is insensitive :( but for sololearn would there be a way to fix this? thank you!
Even I am facing the same problem.
Fox true that something like your example can work to manipulate strings, but that is totally offtopic for a beginner practice quiz. The task is supposed to test the understanding of ORDER BY and LIMIT clauses. String functions are not even mentioned at that point.
I faced the same situation today in Zoo project. I know my code is correct but it gives me errors althou it outputs the same result but without camelcases. This is my code : /* name - "Slim", type - "Giraffe", country_id - 1 */ INSERT INTO Animals VALUES('Slim', 'Giraffe', 1); SELECT name, type, country FROM Animals INNER JOIN Countries ON Animals.country_id = Countries.id ORDER BY country;
I used InitCap() as Shawn Blackman suggested but, unfortunately, in Zoo project 'USA' is all capitals opposite to, let's say 'India'. So I'll wait for fixing... Cheers!
The issue still persists as you can see in this printscreen http://prntscr.com/12gqyb0 I have sent an email to [email protected] to ask them to fix it since we can't get our certification as long as lesson 28 is not solved.
Same here with the 3 cert projects
The issue also appears in SQL - End of module project 28
The output is case sensitive...
I have the same problem with zoo and cake project
The issue seems to be fixed by devs