Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Very long "WHERE" list.
On Sat, 10 Jul 2004 09:24:17 -0700, Daniel Morgan <damorgan_at_x.washington.edu>
wrote:
>> dbms_output.put_line('') would at least be legal.
>>
>>>But if you write it you should be fired.
>>
>> Why is attempting to put blank lines into debug output a cause for dismissal?
>
>Personally I don't allow any program to get past debug stage with
>dbms_output in it because it is without purpose.
That's certainly a fair point. But more of a point to be picked up in a code review and coding standards than cause for immediate dismissal for typing the code posted as an anonymous block ;-)
> But you are incorrect about ('').
>
>SQL> begin
> 2 dbms_output.put_line(NULL);
> 3 end;
> 4 /
>
>PL/SQL procedure successfully completed.
Have a look at my followup post - it turns out it's version dependent. Works on 10g, not on 9i. Haven't got 8i handy to try, not used it in a while.
Doing a describe shows that 9i has two overrides for DMBS_OUTPUT.PUT_LINE, one taking VARCHAR2 and the other taking NUMBER. Which is ambiguous if you pass NULL, so raises a compile-time exception.
Whereas 10g only has one DBMS_OUTPUT.PUT_LINE, taking a VARCHAR2 parameter. So it relies on implicit conversion of other types, but removes the ambiguity if you pass NULL.
-- Andy Hassall <andy_at_andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/spaceReceived on Sat Jul 10 2004 - 11:45:40 CDT