tag:blogger.com,1999:blog-8677649049588007585.post2324916520123802983..comments2023-06-18T16:15:22.432+01:00Comments on PL/SQL Challenge: Ambiguity in 9 September quiz requires score adjustment (1375)Steven Feuersteinhttp://www.blogger.com/profile/16619706770920320550noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8677649049588007585.post-38498550275142926832010-09-10T17:36:41.791+01:002010-09-10T17:36:41.791+01:00Steven, They are being mean to you because you DID...Steven, They are being mean to you because you DID just return from 2 weeks on a Carribean island, sort of a working vacation I guess, and we were all slogging away in our cubes for the last 2 weeks.<br /><br />Welcome back. Thanks for being patient with us as well.Sparkyhttps://www.blogger.com/profile/11199100397673558515noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-8301190006013968252010-09-10T17:24:37.064+01:002010-09-10T17:24:37.064+01:00I suppose you could say that those empty specs do ...I suppose you could say that those empty specs do have a declare section, but it's just empty.<br /><br />The declare in a package begins immediately after the word "is"; therefore there's no way possible to create a package that has no declare section.Ken Rowhttps://www.blogger.com/profile/02740427410810311883noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-58331174800510241312010-09-10T17:09:37.950+01:002010-09-10T17:09:37.950+01:00Steven,
Thanks for taking all the feedback and no...Steven,<br /><br />Thanks for taking all the feedback and not reacting by skipping out for another vacation! I also questioned the "may not" phrase, but figured "it's just a quiz, not my whole world, so I'll take a stab and see what happens."<br /><br />:-)Stewhttps://www.blogger.com/profile/05177922393895344852noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-76709593062737485882010-09-10T13:16:56.269+01:002010-09-10T13:16:56.269+01:00Yes, you are right, all of you are right...but her...Yes, you are right, all of you are right...but here's my question: I just returned from being away for two weeks and WHY ARE YOU ALL BEING SO MEAN TO ME? <br /><br />:-)<br /><br />Because I deserve it, that's why. <br /><br />It's funny - I thought this quiz would be about as straightforward as could be, and a beginner quiz for sure.<br /><br />It has turned into a total unadulterated mess. <br /><br />My deepest apologies to all of you.<br /><br />So: the bottom line is that the declaration section is always optional. So I will make all the necessary adjustments and then hopefully we can all move on? <br /><br />Thanks again, StevenSteven Feuersteinhttps://www.blogger.com/profile/16619706770920320550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-83129770620693902882010-09-10T12:20:14.122+01:002010-09-10T12:20:14.122+01:00In your description of the declaration you wrote: ...In your description of the declaration you wrote: "This section is not optional, however, for package and type specifications. Instead, at least one declaration is required, else the specification would be completely empty and the program unit would not compile."<br /><br />This is not true. I have tested it with the following package:<br /><br />CREATE OR REPLACE<br />PACKAGE InitializationTest AS<br />END InitializationTest;<br />/<br /><br />CREATE OR REPLACE<br />PACKAGE BODY InitializationTest AS<br />BEGIN<br /> DBMS_Output.Put_Line( 'Package initalization');<br />END InitializationTest;<br />/<br /><br />You could compile the package, although it would make no sense (because you don't have any chance to execute the initialization section of the package body).Niels Heckerhttps://www.blogger.com/profile/01416262288792133003noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-32101183661965500502010-09-10T11:28:44.290+01:002010-09-10T11:28:44.290+01:00The same for me (comment on September 10, 2010 3:2...The same for me (comment on September 10, 2010 3:29 AM). I as a non native speaker understood the choice as "declaration section is optional".Unknownhttps://www.blogger.com/profile/03813440070210845954noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-11238554890670418512010-09-10T09:50:23.326+01:002010-09-10T09:50:23.326+01:00I also thought this one was correct, I even tried ...I also thought this one was correct, I even tried it for a package specification (10.2.0.4):<br /><br />create package test<br />is<br />end;<br />/<br /><br />This compiles fine and I see no declarations in it. For types I was not sure (I gave it too little thought and am not too familiar with them). So I am a bit surprised it is said to be necessary for package specifications...but for Types I can imagine it is needed and if so that would make the answer indeed 'Incorrect'. "Never have to" means that it would be optional for all PL/SQL blocks and if there is one where it is not optional (Type specs) it is not optional for all anymore. But I do not agree with the requirement for Package Specs (or I am totally lost ;-), also possible).<br /><br />ToineAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-77594617026195011772010-09-10T08:57:26.068+01:002010-09-10T08:57:26.068+01:00Steven, you wrote:
"This section (declaration...Steven, you wrote:<br />"This section (declaration) is not optional, however, for package and type specifications. Instead, at least one declaration is required, else the specification would be completely empty and the program unit would not compile."<br />I don't understand it, because it's possible to write:<br />create or replace package TEST is end;<br />/<br />There is no declaration section in it and it would compile.Franky666https://www.blogger.com/profile/00346356291405411400noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-81368634026262968212010-09-10T08:34:35.766+01:002010-09-10T08:34:35.766+01:00Steven Sir, The below sentence of yours had bid me...Steven Sir, The below sentence of yours had bid me to post this comment:<br />".....need to concentrate on offering quizzes that are driven by code and Not text."<br />I don't feel belittled to admit that I liked the 9th Sep Quiz most. Not because it was just basic; but besides being so, it shook the belief of many "Like Me" who say - <br />“DECLARATION SECTION, <br /> EXECUTION SECTION, <br /> EXCEPTION SECTION; <br />that’s all? Now I know Pl sql coding."<br />The 9th Sep Quiz points rightly hit "My kind" of guys at the right places.<br /><br />So I strongly recommend some (I should say Many MORE) similar pieces of enlightenment for these lesser Mortals. <br />(^_^)Unknownhttps://www.blogger.com/profile/02710958695836248739noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-52023194143933344782010-09-10T07:30:44.538+01:002010-09-10T07:30:44.538+01:00Like the comment from "funny face" (numb...Like the comment from "funny face" (number two comment), I also had problems with "You never /have/ to provide any declarations in a PL/SQL block."<br /><br />My reasoning (also as a non-native speaker):<br /><br />Had the answer been "You /have/ to provide some declaritions in a PL/SQL block" - that would have been a wrong answer, since at least some types of PL/SQL block have optional declations.<br /><br />Thus the opposite answer "You never /have/ to provide any declarations in a PL/SQL block" must be true, right? :-)<br /><br />But now when I read your explanation, I understand that by "never" you meant "there is no type of PL/SQL block where you /have/ to provide declarations".<br /><br />I guess I probably was misled by the emphasis "You never /have/..." rather than perhaps "You /never/ have..."<br /><br />But it is purely linguistics. It is very very hard to write about programming clearly in natural language rather than code - look at how many terrible manuals exist out there in the world :-)<br /><br />I couldn't do it better, Steven - you do a great job. It verges on the impossible to very short sentences that are absolutely clear and unambigous.<br /><br />That said I applaud your goal of using more code - code-based questions/answers are much safer for all concerned :-)<br /><br />(Personally I tend to write long detailed explanatory text in mails to my colleagues - I can hear their groans when they receive yet another novelsize mail from me :-) I do it to be certain my meaning is clear. But that is not an option to write 50 lines for each answer in a quiz - we will just have to accept that these things /will/ happen from time to time...)Kim Berg Hansenhttps://www.blogger.com/profile/06491635470794828550noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-4455644912699484792010-09-10T04:17:41.391+01:002010-09-10T04:17:41.391+01:00I am a native speaker and I read it as "it is...I am a native speaker and I read it as "it is optional" as well. Maybe if he hadn't put the word "have" in italics. I took that as an emphasis that made the modifying word "never" stronger too and they became a single idea.Seanhttps://www.blogger.com/profile/15790298349995376048noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-43396554742617942242010-09-10T03:41:43.693+01:002010-09-10T03:41:43.693+01:00I'm befuddled over the "never have to pro...I'm befuddled over the "never have to provide declarations". <br /><br />You said in your scoring remarks that the declare is required for a package spec, but this is not so for me:<br /><br />SQL> create package empty_pk as<br /> 2 end;<br /> 3 /<br /><br />Package created.Ken Rowhttps://www.blogger.com/profile/02740427410810311883noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-49181383397101019032010-09-10T03:29:15.387+01:002010-09-10T03:29:15.387+01:00"You never have to provide any declarations i..."You never have to provide any declarations in a PL/SQL block."<br /><br />I (a non-native speaker) interpreted the above statement like below:<br /><br />You have to === it is a must<br /><br />You never have to === It is never a must === it is optional.<br />So "You never have to provide any declarations in a PL/SQL block." meant to me " It is optional to provide declaration section" so I gave Yes to this choice.Spoonhttps://www.blogger.com/profile/04277621011196124328noreply@blogger.comtag:blogger.com,1999:blog-8677649049588007585.post-87315519148484687532010-09-10T03:26:27.005+01:002010-09-10T03:26:27.005+01:00I agree with you on (a) but suggest you add an ass...I agree with you on (a) but suggest you add an assumption that precludes something like <br />ALTER SYSTEM SET PLSQL_WARNINGS='ERROR:06002'<br /> where a "warning" actually prevents compilation/execution. I can't see it applies in this situation, but wouldn't be surprised if sometime it might affect an answerSydOraclehttps://www.blogger.com/profile/08828771074492585943noreply@blogger.com