Toad World® Forums

Why is my Q##<funny-number>QNT invalid?


#1

A user of Code Tester 1.5 just reported a problem with a very big, complex test definition. When she generates and tries to run the test, she gets an error like this:

EVALEPV.Q##347244986_QNT is invalid

And it is very hard to track down the cause of this problem.


#2

Now I will reply to my original post!

The QNT object is a nested table based on an object type, which has the name Q##QOT. So if you do see this error, go to the QOT and take a look at that. It will give you (or us, Quest Support) a clue as to what might be wrong. For example, in this case, when I looked at the QOT, it showed me this:

CREATE OR REPLACE
TYPE HR.Q##347244986_QOT IS OBJECT

(

-421 NUMBER

,COL$2 NUMBER

,COL$3 NUMBER

);
/

And here is the problem: -421 is not a valid name for an attribute in an object type. Why did this happen? It is a bug in 1.5 that is fixed in 1.6. The user specified an expected value query of:

SELECT -421, 0, 0 FROM dual

So two things to keep in mind (besides the fact that we fix this in 1.6):

  1. When you specify these selects with literals for expected values, use column aliases and that should avoid the problem.

  2. But if you are already are IN this difficulty, then you will need to run a PL/SQL block in your Code Tester schema that goes something like this:

DECLARE
l_colset qu_column_set_tp.column_set_t;
BEGIN
SELECT column_set
INTO l_colset
FROM qu_column_set
WHERE universal_id = ‘{D02DE2F3-E628-44AD-AF28-98294105E2C3}’;

FOR indx IN 1 … l_colset.COUNT
LOOP
IF l_colset (indx).column_name = ‘-421’
THEN
l_colset (indx).column_name := ‘COL$1’;
END IF;
END LOOP;

UPDATE qu_column_set
SET column_set = l_colset
WHERE universal_id = ‘{D02DE2F3-E628-44AD-AF28-98294105E2C3}’;
END;

In other words, I looked at the data in the qu_column_set table and found the row with the offending column name in it. Then I updated that column name to a column name that is valid.

Obviously, this is a tricky little fix - don’t hesitate to ask Quest Support for help. But this is the sort of thing you will need to do.

Or install the 1.6 beta (click on Quest Code Tester Beta link on the left) and the problem should go away.

SF