Code Analysis: Rule 5406

These two snippets are marked with “5406: Remove unused parameters or modify code to use the parameter.”

DECLARE
CURSOR test_cur(
in_dummy IN dual.dummy%TYPE
)
IS
SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN dummy = in_dummy THEN 1 END )
FROM dual;
BEGIN
NULL;
END;

CREATE OR REPLACE PROCEDURE test_proc(
in_dummy IN dual.dummy%TYPE
)
AS
rn PLS_INTEGER;
BEGIN
SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN dummy = in_dummy THEN 1 END )
INTO rn
FROM dual;
END test_proc;

CREATE OR REPLACE PROCEDURE test_proc(
in_dummy IN dual.dummy%TYPE
)
AS
rn PLS_INTEGER;
BEGIN
SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN dummy = in_dummy THEN 1 END )
INTO rn
FROM dual;

Need a thorough look (QP-1726)

Thanks,
Andre

Similar problem here, not sure if related:

PROCEDURE insert_something(
in_something IN PLS_INTEGER
)
AS
BEGIN
INSERT INTO some_table( some_column )
(
SELECT in_something FROM dual
);
END insert_something;

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

Is there a way for me to find out the QP5 version of a TOAD release?

Sure. Go to the Toad program files folder, locate file QP5.dll and then right click Properties -> Details.