Edit results of query in data grid – Toad

Query statements MUST return the ROWID to be updatable. For example:

select * from employee where salary > 2000

would not be updatable, whereas:

select employee.*, rowid from employee where salary > 2000

would be updatable.

To reduce this obvious nuisance, you can use the TOAD-specific EDIT statement. For example:

edit employee where salary > 2000

If the resultset should be editable but remains read-only, make sure the TOAD Options > Data Grids – Data tab, Default to Read-Only Queries checkbox is NOT enabled

in reference to:

“Query statements MUST return the ROWID to be updatable. For example: select * from employee where salary > 2000 would not be updatable, whereas: select employee.*, rowid from employee where salary > 2000 would be updatable. To reduce this obvious nuisance, you can use the TOAD-specific EDIT statement. For example: edit employee where salary > 2000 If the resultset should be editable but remains read-only, make sure the TOAD Options > Data Grids – Data tab, Default to Read-Only Queries checkbox is NOT enabled”
faq:answers:datagrid – TOAD Wiki (view on Google Sidewiki)

Advertisements

One thought on “Edit results of query in data grid – Toad

  1. Thank you so much!! This really help. A question…

    Using SQL Editor, how to produce new line character in the Data Grid result? My SQL below doesn't working.

    SELECT 'ABC' || CHR(13) || CHR(10) || 'DEF' FROM DUAL;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s