Print Thread
Compiler Warning on Update
#65732 06/11/24 01:47 PM
Joined: Apr 2020
Posts: 101
Z
zakko Offline OP
Member
OP Offline
Member
Z
Joined: Apr 2020
Posts: 101
The following update statement in PL/SQL code produces a compiler warning in PL/SQL Developer:

Code
UPDATE employees
   SET commission_pct = NULL
   WHERE job_id = 'SH_CLERK';

It says Hint: Comparison with NULL in [procedure name], but it is obviously not a comparison.

Version 15.0.4.2064 (64 bit)
Windows 11 Build 22631

Re: Compiler Warning on Update
zakko #65735 06/12/24 08:47 AM
Joined: Aug 1999
Posts: 22,597
Member
Offline
Member
Joined: Aug 1999
Posts: 22,597
I cannot immediately reproduce this. Can you send me a complete example?


Marco Kalter
Allround Automations
Re: Compiler Warning on Update
zakko #65736 06/12/24 02:57 PM
Joined: Apr 2020
Posts: 101
Z
zakko Offline OP
Member
OP Offline
Member
Z
Joined: Apr 2020
Posts: 101
No, unfortunately I can't share the original code, but I made a few changes to have it as close to the original as possible. I recognized, I missed a detail. The update is part of a forall, like so:

SQL Query
forall idx in 1..textArray.count save exceptions
  update books set startText = null
    where startText = textArray(idx).text
      and textArray(idx).name is null;

If I klick the warning, it marks the line "update books...". It might be possible, that the warning covers the whole update command and actually refers to the "is null" comparison - just a guess. But even in the latter case, I don't get the reason behind the warning.

Re: Compiler Warning on Update
zakko #65737 06/13/24 08:51 AM
Joined: Aug 1999
Posts: 22,597
Member
Offline
Member
Joined: Aug 1999
Posts: 22,597
This does indeed reproduce the issue for me. We'll fix it!


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.192s Queries: 14 (0.150s) Memory: 2.5090 MB (Peak: 3.0399 MB) Data Comp: Off Server Time: 2025-03-27 06:29:00 UTC
Valid HTML 5 and Valid CSS