07 April 2011

But NO_DATA_FOUND was raised in 6 April quiz! (2163)

The explanation for the 6 April quiz explained why the NO_DATA_FOUND exception would not be raised when the single row and bulk FETCH statements were executed. Yet the correct answer clearly showed that NO_DATA_FOUND had been raised.

Well, that was confusing - and many players wrote to tell us so. Our apologies!

The explanation was incomplete. We have now added the following text:

The reason....that the correct answer displays "NDF" is that Oracle also raises the NO_DATA_FOUND exception when you try to "read" an element in a collection at an undefined index value. As a result, when Oracle executes this line:
sys.DBMS_OUTPUT.put_line (tab (1).dummy);
NO_DATA_FOUND is raised, since the collection is empty (there is no element at index value 1). 

Hopefully all is now clear. Thanks for "keeping us honest."

05 April 2011

Participants in the 2011 Q1 Playoff

The following players have qualified for participation in the 2011 Q1 playoff. There are three categories of players: those who qualify by ranking (top 25), those who qualify through correctness, and wildcard entries. Check the FAQ to read the details on how the latter two groups are selected.


Rank Name Qualified Through
1 Frank Schrader Ranking
2 _Nikotin Ranking
3 Dennis Klemme Ranking
4 Filipe Silva Ranking
5 Pavel Zeman Ranking
6 Viacheslav Stepanov Ranking
7 Christopher Beck Ranking
8 Elic Ranking
9 Gary Myers Ranking
10 Jeff Kemp Ranking
11 mentzel.iudith Ranking
12 Justin Cave Ranking
13 Sean Stuber Ranking
14 kowido Ranking
15 Siim Kask Ranking
16 Spoon Ranking
17 xtender Ranking
18 Randy Gettman Ranking
19 Marcus Matzberger Ranking
20 Yuriy Pedan Ranking
21 Thierry Poels Ranking
22 Michal Pravda Ranking
23 Joaquin Gonzalez Ranking
24 Mike Pargeter Ranking
25 Peter Hraško Ranking
28 Dalibor Kovac Correctness
29 Kevan Gelling Correctness
34 Jure Mekis Correctness
39 Kim Berg Hansen Wildcard
41 V Vandana Patel Wildcard
45 Pavel Mitrofanov Wildcard
50 Lutz Bueschler Wildcard
51 Niels Hecker Wildcard
53 Ismayil Huseynli (SAYBERNET) Wildcard
55 Morten Braten Wildcard
57 Matthias Rogel Wildcard
68 Urs Metzger Wildcard
77 Hrvoje Torbašinovic Correctness
105 Dominic Brooks Correctness
107 Anna Onishchuk Correctness
169 Natarajan-wbt Correctness
193 pinkal soni Wildcard
195 maulwurf Correctness
246 JerryQ Correctness
726 Todd Aron Correctness

The distrbution of participants by country is:

Country Participants
Germany 8
United States 5
Russia 4
India 3
United Kingdom 2
Croatia 2
Ireland 2
Czech Republic 2
Australia 2
Slovakia 1
Belarus 1
Denmark 1
Estonia 1
Spain 1
Azerbaijan 1
Israel 1
Belgium 1
Isle of Man 1
Ukraine 1
Portugal 1
Singapore 1
Norway 1
Slovenia 1
*No Country* 1

Congratulations to all players who have qualified, especially those who placed in the top 25 ranking for the quarter! We will announce the date and time of the playoff soon.

Quiz Status for 4 and 5 April

The PL/SQL Challenge experienced lengthy downtime, starting at approximately 20:00 4 April and lasting till approximately 9:00 5 April.

The rule for the PL/SQL Challenge is that if the site is unavailable for at least four hours in a day, the quiz results are not counted in ranking.

We know that players were not able to submit answers on 4 April, so results for yesterday (4 April) are voided.

We will probably void results for 5 April as well, but it is possible that everyone will be able to take the quiz with the time remaining. If we do not have reports of being unable to submit an answer before end of day, we will use the answers for ranking purposes.

Our apologies for the disruption in access to the PL/SQL Challenge.

Steven Feuerstein

04 April 2011

PL/SQL Challenge website unavailable from 9:15 PM UTC

Due to some problems at the service provider, the PL/SQL Challenge website went down at 9:15 PM UTC (aka, 19:15). At this time, it looks doubtful that it will come back up before the end of the day.

But, hey, anything's possible!

The rule for voiding results of a day's quiz is that the website is down for at least four hours. That will not be the case today, so the results of the quiz will be counted.

So if you have not yet answered the quiz, please check back before midnight UTC (if you can). Hopefully no one will miss submitting their answer.

Our apologies,
Steven Feuerstein

02 April 2011

Ambiguous wording in 1 April quiz? (2145)

The 1 April quiz offered this question:

Over the years, many development teams have created large scripts in anonymous blocks to run in the background and perform all sorts of complex data management tasks. Which of the choices describe a reason to move as much code as possible from the anonymous blocks into procedures and functions stored in the database (either schema-level or within packages)? 

Several players raised a concern about the scoring of this choice as correct:

The business logic in the scripts is more likely to be reused.

Here is a comment that reflects the concerns:

You marked the "The business logic in the scripts is more likely to be reused." as a correct answer, but I have great doubts about its wording. From my point of few this wording should be interpreted as "business logic that stay directly in the scripts (as oppose to be moved to stored objects) has more chances to be reused". Definitely incorrect statement. 

I would agree with this objection, if I had to decide on the correctness of this choice separately from the question. All by itself, "The business logic in the scripts is more likely to be reused." can be interpreted to mean either that the logic is more likely to be reused when left in the anonymous block OR when it is moved to a stored program unit.

But when playing the quiz, you do not consider these choices out of the context of the question, and the question clearly asks "Which of the choices describe a reason to move as much code as possible from the anonymous blocks into procedures and functions...?"

So I believe that the wording of the question removes any possible ambiguity - no change in scoring is required.

Another player wrote: "Can an anonymous block be optimized to the same degree as a stored procedure? The first thing that came to mind seeing that option was that an anonymous block cannot be natively compiled."

My response: I am actually not certain about what Oracle will do with anonymous scripts when native compilation is enabled, but I feel that when you are working with a language whose compiler offers automatic optimization (true of Oracle PL/SQL since 10.1), a statement like "The compiler will optimize the code in the stored program units, but it cannot do the same for an anonymous block." would most obviously and clearly relate to that optimization process and not a special feature of the Oracle Database like native compilation.

Again, no change in scoring.

Your thoughts?
SF

01 April 2011

Comments and questions about date format masks (2144)

The 31 March quiz tested your knowledge of the use of the "Month" format mask for TO_CHAR. We received the following comments and questions:

1. "ELSE 'Not Short and Not Long *'||v1||'*'||v2||'*' . answer: Not Short and Not Long *September*October * Why is the length 2*9 positions and not 10?"

2. "Hi, I'm referring to the daily quiz for 31 March 2011. This quiz was very interesting, testing the players' various areas of PL/SQL functions and data types. Unfortunately, in the post-quiz comment, the author only mentioned how the data format model affects the return value, but forget to talk about the importance of data types and implicit conversions.

"If v1 and v2 were declared as CHAR, then blank-padded comparison semantics would have been used, and the output would be 'Long and Sour'.

"On the comparison semantics: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements002.htm#sthref305

3. I have read the explanation but still don't know why it is like that. Am sure there will be a hot discussion on this issue. I personally feel it's a bug. Waiting for the discussion to start on the blog.

I have invited Jeff, the author of the quiz, to reply; we will also undoubtedly update the explanation after this conversation is finished.

Another quarter ends!

Dear PL/SQL Challenge Players:

Another quarter has ended, a new quarter has begun.

And you know what that means:

1. I will be announcing the participants in the 2011-Q1 playoff championship soon (likely next week).

2. Everyone starts with a "clean slate" for Q2. If you weren't happy with your ranking last quarter, you have the opportunity to play diligently and carefully and keep your ranking up high.

3. If you have been playing non-competitively and would like to switch, now (the first week of every quarter) is the time to switch back to competitive play.

I will send out a newsletter with detailed information about activity of all players in the quarter. But here's an early glimpse:

Total number of unique players: 1,722
Total answers submitted: 21,604
Time playing quizzes: 73 days 15 hrs 44 mins
Total countries playing: 86

More to come, thanks again to everyone for playing - I hope you've learned a lot. Please spread the word to other developers to join us!

Warm regards,
Steven Feuerstein