Toad World® Forums

Sql Nav 6.2.1 - Update table using Ctrl-E


#1

Good day

We’ve noticed some strange behaviour when we try and edit table data by using Ctrl-E from the DB Explorer.

  1. Ctrl-E on the table generates a select statement that returns all the data in the table. At this point all the data is editable and the UPDATEABLE icon is ON.

select *
from table_a

  1. However, as soon as I add a ‘where’ clause to the generated select statement, it’s not possible to edit the table anymore, although the UPDATEABLE icon still shows as ON.
    select *
    from table_a a
    where a.table_id = 123

Turning UPDATEABLE icon OFF and ON again, does not make a difference. We’ve experienced this on a number of pc’s with SQL Nav 6.2.1.1521. What is strange though, is that this behaviour is not consistant for all tables. On some of them, the table is still in edit mode even after I’ve added a ‘where’ clause.

Thank you in advance,
Annelize


#2

Hi Annelize,

Thanks for reporting this issue. This bug only appears if the query spans more than 2 lines or the where clause is on the same line as the from clause.

select a.col1,
a.col2
from table_a a where a.col1 = 123; --this doesn’t work

A work-around would be to modify the code as follow:
/where clause on the same line as from clause but the query is less than 3 lines long/
select *
from table_a a where a.table_id = 123;

or
/where clause is not on the same line as from clause/
select *
from table_a a
where a.table_id = 123; – this query works for me

Let me know if it works. We will have this fixed soon.

Gwen
Message was edited by: Gwen


#3

Thank you for your response, Gwen.

I actually found that with some tables the resultset will be editable if I bring it down to 5 lines:

–works
SELECT a.col1, a.col2, a.col3,
a.col4, a.col5, a.col6,
a.col7, a.col8, a.col9
FROM table_a a
WHERE a.col1 = 2

–doesn’t work
SELECT a.col1, a.col2, a.col3,
a.col4, a.col5, a.col6,
a.col7, a.col8, a.col9,
**a.col10, a.col11, a.col12 **
FROM table_a a
WHERE a.col1 = 2

As a workaround I will do as you suggested and just change my select statement to a
select *
from table_a a
where …

Thanks,
Annelize


#4

Thank you, this seems to be fixed in 6.3.
Annelize