Hi there,
I am following the tutorials in the “Get started with Oracle Database Development Guide”
get-started-oracle-database-development.pdf
and reached example 5-7. I entered the following statement:
SELECT HIRE_DATE, j.JOB_ID, SALARY, MAX_SALARY INTO h_date, j_id, sal, sal_max
FROM EMPLOYEES e, JOBS j
WHERE EMPLOYEE_ID = eval_frequency.emp_id AND JOB_ID = eval_frequency.j_id;
SQL Developer 23.1 highlighted the EMPLOYEES table alias “e” with an underline squiggle , and hovering the cursor revealed the message
E
is disconnected from the rest of the join graph:
E
J
I thought that this might be due to the fact that the table alias is not used anywhere in the query, and looked further on in the tutorials for another example; the tutorial did not instruct to compile or run the example. I found a similar example, and so changed the SELECT statement to the following:
SELECT HIRE_DATE, j.JOB_ID, SALARY, MAX_SALARY INTO h_date, j_id, sal, sal_max
FROM EMPLOYEES e, JOBS j
WHERE e.EMPLOYEE_ID = eval_frequency.emp_id AND j.JOB_ID = eval_frequency.j_id;
This did not immediately clear the squiggle, but on closing the SQL pane and re-opening it had disappeared.
Is the example wrong? Why is a table alias used for the EMPLOYEES table at all when it is not used in the rest of statement as the JOBS table alias is?
Why doesn't SQL Developer clear the squiggle immediately when I changed the SELECT statement?
Next, I tried to see what would happen in the SQL Developer Extension for VS Code. I opened up the connection, clicked on the Packages node, clicked on the EMP_VAL package and received the message “An error occurred while fetching data”. I clicked on the squiggle under the message and the following was displayed:
Syntax Error at line 1, column 2; Expected: '(',paren_expr_list,"(x,y,z)",is_JSON_condition___dbtools
EMP_EVAL.sql(1, 3): Syntax Error at line 1, column 2
An error occurred while fetching data
^^^
Expected: '(',paren_expr_list,"(x,y,z)",is_JSON_condition___
Not sure if this is the correct place to report this error.
Regards
John.