14 August 2010
Rescoring performed for 13 August Quiz on INDICES OF BETWEEN (1330)
The 13 August quiz asked you to answer this question: "Which of the following statements regarding the BETWEEN clause of the INDICES OF feature are true?" We scored the following choice as correct: "The values in the BETWEEN clause can be any valid PLS_INTEGER value." Several players, led by Sergey P., objected, pointing out that you could use, for example, 1.5 (which is clearly not a PLS_INTEGER value) for either of the expressions in the BETWEEN clause. Oracle would not raise an issue, it would simply implicitly convert this number into an integer and then use it to execute the FORALL statement. My first reaction to this was: yes, it is true, that you can in fact supply any expression in BETWEEN that can be evaluated to a PLS_INTEGER. But the choice only states that the values "can be" any valid PLS_INTEGER value. This statement is undoubtedly true. You can use any PLS_INTEGER value, and you can also use other values that implicitly convert to a PLS_INTEGER value. So I could stand by my original scoring; from a linguistic standpoint, I am correct. The PL/SQL Challenge is not, however, about the English language. It is about Oracle and PL/SQL technologies. So I have decided to rescore answers to this question, so that even if you did not mark this choice as correct, you will receive credit. I will also change the text of this choice to remove this ambiguity in the future. Sigh...I was just about to post a note on the blog expressing deep satisfaction that we had gone over two weeks without any need to adjust scores (that is, we published quizzes without errors). Well, I can't do that, but I can express joy that the quality of the quizzes have improved dramatically since Darryl Hurley and Ken Holmslykke agreed to become reviewers of my quizzes. May thanks to Darryl and Ken! And, finally, congratulations to Sergey for winning his choice of an O'Reilly Media ebook for being the first player to point out this issue. Oh and one other thing: a player wrote to say that "I think that if a value is specified in the BETWEEN clause, it must be a literal." This is not the case, as you can see by putting together a test script or running the code I included in my answer text.