Toad World® Forums

Code review 403 error and a request


#1

1- The error report:
Finally I discover the origin and find out a simple test code for a bug that even formatter 5.* had

when you have more than a table and e null return colum

SELECT ds.dummy
, NULL
FROM DUAL ds
, DUAL cd
WHERE ds.dummy = cd.dummy

it will give

/*ADVICE(5): Elements in the SELECT list (either columns or expressions) are
not qualified by a table/view name [403] */

due to the null (if you change it to a constant like ‘A’ it doesn’t show the advice)

2- the request:
sometime if larger queries I got that advice and it would be great if the system would get me the line(s) where that appear (to make the check easier)

Happy new year

Filipe Silva


#2

Hi Filipe,

I will forward your request to the Formatter team.

Cheers
Gwen


#3

Hi Filipe,

1- Yes, I think it’s a bug to fire advice for NULL. But currently we are still using old Fmt Plus 4.* to generate advice then we insert them to the result which is formatted by 5.. We don’t plan to update/fix bug for Fmt Plus 4. but the formatter team will implement Code Review/Advice with 5.* in the near future. I will forward your report to them and hopefully this bug won’t appare in the new version.

2- It’s a nice idea. I will log CR for this. You may already know that there’re some options in Formatter Options -> Comment Generation -> Recommendations page. You can select one of the last two options and then an advice summary will be generated in the end of the formatted text. The advices will be counted and listed here but there is no line number. Do you think it’s OK to place the line numbers to each advice here?

Thanks,
Vincent


#4

I second Vincent. A new advice engine is work in progress. In Formatter Plus the line numbers are missing, that will sure be addressed.

Thanks,
Andre


#5

Hi Vicent

1- Of course I was expecting a fix for the new version (not the old one) :slight_smile:
2- yes that could be a place. the other place could be in the advice itself but maybe that could be more trouble for you guys

thanks
Filipe


#6

Hi Filipe,

2- We have already placed the line number in the advice itself.
See /*ADVICE(1): … in the second line, the number 1 is the line number of the item which fires the advice.

I hope it helps.

Thanks,
Vincent


#7

It seems like the attached image couldn’t be shown. I paste the formatted source here:
SELECT ds.dummy, NULL
/*ADVICE(1): Elements in the SELECT list (either columns or expressions)
are not qualified by a table/view name [403] /
FROM DUAL ds, DUAL cd
WHERE ds.dummy = cd.dummy
/
Formatted on 16-Dec-2008 18:24:03 (QP5 v5.120.811.25008) */

/* ADVICE:
ADVICE SUMMARY

Count Recommendation


1  [403]  Elements in the SELECT list (either columns or expressions) are
          not qualified by a table/view name
              You will improve readability and potentially query
              performance by qualifying each reference to a column with
              the object that owns that column.
              In addition, you will avoid undesired capture which may
              occur as a result of database schema evolution or
              migration.

*/


#8

This problem is fixed for null but not for rownum :slight_smile:

SELECT ROWNUM, d.dummy
/*ADVICE(1): Elements in the SELECT list (either columns or expressions)
are not qualified by a table/view name [403] */
FROM DUAL d, DUAL d2
WHERE d.dummy = d2.dummy

Regards