Toad World® Forums

Code Analysis: "5406 Remove unused parameters" when used in sub query

in_dummy is marked with “5406 Remove unused parameters or modify code to use the parameter.”

CREATE OR REPLACE PROCEDURE prc(
in_dummy IN dual.dummy%TYPE
)
AS
v_dummy dual.dummy%TYPE;
BEGIN
SELECT CASE WHEN EXISTS( SELECT 1 FROM dual WHERE dummy = in_dummy ) THEN dummy END
INTO v_dummy
FROM dual;
END prc;

Did you get this?

Yep, I logged this together with your Jul 19 post http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/31085 .

Thank you anyway for your feedback, please keep on posting new findings. But unfortunately we can’t fix them as quickly as you can post … :slight_smile:

I’m usually impressed by the time it takes you to fix things :wink:

Just wanted to make sure that you got this one too.

This has been addressed, soon to show up in a new Toad having QP5 version 5.305 (or later).
In addition, the following issues were detected and fixed:

  • Nested variable declarations and parameter declarations in nested program units or cursors are taken into account.,
  • Items in select lists are no longer discarded,
  • In qualified names now only the leftmost identifier is taken into account.
    Thanks,
    Andre