SELECT employee.name,
employee_boss.name
FROM employee
JOIN employee employee_boss ON employee_boss.empno = employee.boss
SELECT employee.name
FROM employee
WHERE employee.boss IS NULL
UNION
SELECT employee.name
FROM employee
WHERE employee.boss IS NOT NULL
INSERT INTO my_table
SELECT a.id_number,
a.street1,
a.street2,
a.street3,
a.city,
a.state_code,
a.zipcode
FROM address a
DELETE FROM my_table t
WHERE t.id_number IN (SELECT a.id_number
FROM address a
WHERE yadda-yadda)
SELECT *
FROM user_objects
WHERE EXISTS (SELECT NULL
FROM user_source
WHERE user_source.name = user_objects.object_name
AND user_source.type = user_objects.object_type
AND user_source.text LIKE '%UPDATE%')
AND EXISTS (SELECT NULL
FROM user_source
WHERE user_source.name = user_objects.object_name
AND user_source.type = user_objects.object_type
AND user_source.text LIKE '%DELETE%');
SELECT employee.name,
employee.empno
FROM employee
WHERE employee.empno = 10;
CREATE VIEW my_tester AS
SELECT employee.name
FROM employee
WHERE employee.boss IS NULL
UNION
SELECT employee.name
FROM employee
WHERE employee.boss IS NOT NULL;
SELECT *
FROM user_tables
JOIN user_tab_columns USING (table_name)
WHERE table_name = 'ABC'
AND user_tables.status = 'VALID'
AND user_tab_columns.data_length = 20
AND user_tab_columns.data_type = 'NUMBER';
I found if I click on a table alias in an INSERT sub-select, it will highlight the fields, unless they're referenced within a function.
CREATE VIEW my_tester AS
SELECT employee.name
FROM employee
WHERE employee.boss IS NULL
AND employee.name LIKE 'S%'
UNION
SELECT employee.name
FROM employee
WHERE employee.boss IS NOT NULL;
SELECT *
FROM user_tables
JOIN user_tab_columns USING (table_name)
WHERE table_name = 'ABC'
AND user_tab_columns.data_length > user_tab_columns.column_id
AND table_name LIKE 'A%'
AND user_tables.status = 'VALID'
AND user_tables.status != 'X'
AND user_tab_columns.data_length = 10
AND user_tab_columns.column_id > 3;
CREATE FORCE VIEW tester AS
SELECT dual.dummy,
dual.dummy AS dummy1
FROM dual;
This is still a problem in beta 5, as well as the issues in my first post from the 6. November.If I place the cursor on line 2, nothing is marked. If I remove the "AS dummy1" in line 3, lines 2 and 3 are marked.
SELECT *
FROM user_tables
WHERE user_tables.pct_used IS NULL
OR
user_tables.pct_used = 10
CREATE PROCEDURE tester IS
CURSOR my_cursor IS
SELECT NULL
FROM user_tables
WHERE user_tables.table_name = 'ABC';
BEGIN
NULL;
END;
SELECT user_tables.table_name,
trim(user_tables.table_name)
FROM user_tables;
CURSOR cur_dual (param_dummy IN dual.dummy%TYPE) IS
SELECT NULL
FROM dual
WHERE dual.dummy = param_dummy;
SELECT CASE WHEN 1=1 THEN dual.dummy END,
CASE WHEN 2=2 THEN dual.dummy END
FROM dual
CURSOR my_cursor (param_dummy IN dual.dummy%TYPE) IS
SELECT dual.dummy
FROM dual
WHERE (dual.dummy IN (1,2) OR
dual.dummy IN (3,4))
AND dual.dummy = param_dummy
AND (dual.dummy = my_package.my_function AND 1=1)
AND (1=1)
SELECT *
FROM user_tables
WHERE user_tables.table_name = 'A'
OR
EXISTS (SELECT '?'
FROM dual
WHERE user_tables.table_name = 'B')
SELECT nvl(dual.dummy,1),
nvl(dual.dummy,2)
FROM dual
SELECT dual.dummy FROM dual
SELECT dual.dummy FROM dual;
SELECT dual.dummy FROM dual
SELECT nvl(user_tables.blocks,0) AS nvl_blocks,
user_tables.blocks AS blocks_aux,
user_tables.blocks
FROM user_tables
Indeed. We'll fix it.Claus Pedersen said:I was able to reproduce the issue no. 5 from the 19. November post. When you type
in a new editor with no space or similar after the last letter, the last line can not be highlighted. The first line works fine.SQL:SELECT dual.dummy FROM dual; SELECT dual.dummy FROM dual
Please correct, so line 2 can be highlighted.
If you use an alias for a column, only the alias names are highlighted. This is currently how the algorithm works.Claus Pedersen said:Beta 7, I have the select:
SQL:SELECT nvl(user_tables.blocks,0) AS nvl_blocks, user_tables.blocks AS blocks_aux, user_tables.blocks FROM user_tables
When I place the cursor in line 1, lines 1 and 3 are highlighted.
Why is line 2 not highlighted? I know it is aliased, but so is line 1, so why is this line 1 highlighted? Why does highlighting on line 1 and 2 work differently?
The PL/SQL variable highlighting and table.column highlighting are indeed inconsistent here. We'll check it out.Claus Pedersen said:I find it contra-intuitive, that 'singleton' columns are not highlighted. E.g. in the select "select dual.dummy from dual". When cursor is on "dual.dummy", nothing is highlighted. Why? In all other instances (variables, parameters etc.) they are always highlighted, even if that variable or parameter is not used elsewhere. This is a visual help to identify that a variable or column is used in one place only.
SELECT user_tables.table_name,
CASE WHEN EXISTS(SELECT NULL
FROM user_tables user_tables_aux
WHERE user_tables_aux.table_name = user_tables.table_name)
THEN 1 ELSE 0 END AS table_exists
FROM user_tables
WHERE user_tables.table_name = 'ABC';
SELECT *
FROM user_source
WHERE user_source.name = my_package.my_constant OR
user_source.name = my_package.my_constant
SELECT user_tables.table_name,
CASE WHEN EXISTS(SELECT NULL
FROM user_tables user_tables_aux
WHERE user_tables_aux.table_name = user_tables.table_name)
THEN 1 ELSE 0 END AS table_exists
FROM user_tables
WHERE user_tables.table_name = 'ABC';
SELECT dual.dummy,
dummy
FROM dual
WHERE dummy > 'A'