1 Reply Latest reply: Mar 17, 2008 1:35 PM by 595841 RSS

    Discovered change in SQLPLUS "comment processing"

    595841
      Bitch, bitch, bitch. Since I don't have a Metalink userid any more. Your
      the group I chose to which I can complain. Sorry.

      In the past, when SQLPLUS encountered a "/*" sequence it would continue to
      skip "all" input until it reached the "*/" sequence, even if that meant
      continuing the search into the command prompt input mode.

      I know this caused a problem for people who did not know how to writ
      multi-line comments, or were too lazy to figure out how to do it
      correctly.

      In the documentation there was no mention that the comment would be ended
      at the end of the dataset if the closing "*/" was not encountered. Now
      SQLPLUS terminates a multi-line comment at the end of an input dataset,
      even if the "*/" is missing.

      One of the missing constructs of SQLPLUS is the ability to do
      "conditional execution of a subsequent commands" (i.e. IF-THEN-ELSE, and
      DO-LOOP).

      The lack of these constructs could be over-come by the use of imbedding
      pieces of a multi-line comment into different datasets. After all what is
      a multi-line comment doing but "skipping lines of input". Then
      conditionally by including the correct pieces at the appropriate points
      the skipping ends. Based upon the contents of variables, which remained
      unchanged across multiple input datasets, you can control "skipping".
      Finally, you can use sql SELECT statements to set the appropriate
      variable values.

      Using a little more "complicated logic" you could even get
      nested IFs to work.

      I would have much preferred to have SQLPLUS implement IF-THEN-ELSE and
      DO-LOOP processing. I was looking for a SQL language tool that was cross
      platform independent, but did not require you to store the logic within
      the database. With SQLPLUS, I found that tool. I could maintain a set of
      scripts on my workstation. I knew they would work the same across each
      Oracle instance to which I connected. I did not need the DBA
      privilege to work effectively.

      Now SQLPLUS violates its definition of the mult-line comment. It
      terminates a comment at the end of an input dataset, even if the closing
      "*/" is absent. I can see the problem that the Oracle support staff was
      having.

      People use the tool to get things done. Slop is good enough. Who cares if
      I omit an ending "*/"? What I (the casual user wants is something that
      will correct all of my mistakes and give me the correct answer. And if I
      run a simple one SQL command and forget the ending comment, I should not
      end up in a comment "skip" when the script ends. That's too confusing.
      And it takes too much time to debug. (I see the same thought reasoning in
      how HTML evolved.) So I am not surprised, but a little disappointed to
      the "simple-minded" solution that the support team took.

      I think a better solution would have been to warn the user that a
      multi-line comment was still in effect, when control is returned to the
      command prompt input, and given them the object to continue the comment
      or not.

      I have developed scripts for querying system attributes across multiple
      releases. Now the user of "@@IF", @@THEN", "@@END_THEN", "@@ELSE",
      "@@END_ELSE", and "@@END_IF" do not work. And neither does "@@DO_WHILE",
      "@@LOOP" "@@END_LOOP", etc.. work. There goes 5+ years of script
      development. Don't you just hate it when they do that ( I mean change the
      rules, to make it easier for non-IT second graders have it their way,
      even if they don't know what they are doing).

      It's nice to have access to all of the different SQL statements from
      other DBAs, but I find them less useful and hard to manage unless
      I can place them into SQLPLUS scripts.

      I don't want a reply. I will not be looking. I don't have the time. Now must find a circumvention to this inconvenience.