The second call does not produce a line.
I know what it does, or rather what it does not do. That’s my complaint.
I know what sql*plus does too. I don’t like the behavior there anymore than I do in toad.
I know “null” is not data. I don’t want you to print “null”, because, obviously, there’s nothing to print.
I know that null does not have an end-of-line, because it’s just null.
BUT… when Toad prints “a” to it’s output window, whatever code you use that does that also writes a new line. If it didn’t then we’d see “ab” instead of
THAT newline, the one that Toad adds to the output in order to indicate “one line from the buffer is done” is the one I’m looking for.
your code should be written to show something in output to indicate null
That’s what I do now, but really, that’s pretty silly. Toad already has my line, but for whatever reason it’s not displaying it.
Read those words “should be written to show something” - So, in order to show “nothing”, I have to create “something” ?
I don’t want a tab or a space or bell or SOH or any other invisible character. I already have to do that everytime I run into this problem.
I simply want a blank line.
Ironically, I can’t even try to create my own blank line.
If I dbms_output.put_line(chr(10)); I get 2 blank lines. One, my “fake one” and then another one that Toad inserts.
Toad pulls a line from the dbms_output buffer in each of the examples where you say there is nothing. It’s not nothing. It’s an actual element in the buffer array. That element happens to be a null, but it’s just as real and valid as “a”, “b” or any other varchar2 value.
Check the GET_LINE counts in Toad. If you do 3 dbms_output.put_lines, then you’ll get 3 lines. Whether there is actually any data or NULL in those lines is irrelevant. Just print what you get. If I output “a”, Toad actually prints “a\n” in the output window (where \n represents a newline). Put_line “b” becomes “b\n”. So, when the buffer has “” in it, then simply do the same thing: print “\n” maybe the \n is prepended before writing. I don’t know, but whatever the mechanism is that puts “b” below “a”, do the exact same thing for null.
All I’m trying to get is one line of output for each line in the buffer.
I didn’t invent blank lines, I’m simply trying to use them.
If that is unreasonable, can someone explain why?
Again, I understand the current functionality mimics sqlplus; I’m asking for Toad to be “better” than sqlplus, or at least provide the option to be so.