SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Can we edit tables?

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Can we edit tables?
Author Message
SqlExplorer



Joined: 18 Sep 2011
Posts: 103
Country: United States

Post Can we edit tables? Reply with quote
Hi,

We can edit and delete tables manually in Sql Developer. But I can't figure out how to do it in the Sql Assistant editor. I have to use DELETE statements to do it, there.
Mon Jun 26, 2023 8:11 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Using a query select the data you want to edit. If the query is editable, such is that it can recognize table primary key in the result, you can edit data directly in the result grid, as well as delete rows. If the table is small, you can retrieve full table, for example, Ctrl+click table name in the code and then choose Retrieve All menu in the result grid. Or similarly right-click table name in DB Explorer and choose Data Preview and again Retrieve All. there is a button on the result grid toolbar that activates Edit mode.
Mon Jun 26, 2023 9:00 pm View user's profile Send private message
SqlExplorer



Joined: 18 Sep 2011
Posts: 103
Country: United States

Post Reply with quote
Thanks,

I included the primary key in the query and highlighted the rows, but all of the Modify menu items (Right-Click, then Edit, Add Row, Delete Row) are disabled.

I also tried it with a table that doesn't have a primary key and has only 3 columns. In that case, I used SELECT * rather than referring to particular fields. But nothing is editable or deletable.



SysOp wrote:
Using a query select the data you want to edit. If the query is editable, such is that it can recognize table primary key in the result, you can edit data directly in the result grid, as well as delete rows. If the table is small, you can retrieve full table, for example, Ctrl+click table name in the code and then choose Retrieve All menu in the result grid. Or similarly right-click table name in DB Explorer and choose Data Preview and again Retrieve All. there is a button on the result grid toolbar that activates Edit mode.

Wed Jun 28, 2023 2:56 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Does SQL Assistant show primary key for that table its DB Explorer?
Wed Jun 28, 2023 3:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Also if it can recognize table primary key, a little key icon should be painted over the header of the primary key columns. Here is how it appears on my screen



Wed Jun 28, 2023 3:44 pm View user's profile Send private message
SqlExplorer



Joined: 18 Sep 2011
Posts: 103
Country: United States

Post Reply with quote
It recognizes the primary key, according to the left hand column, Table Name/Columns/Field Name.

But in the query, Edit is disabled.

Note that the 'Quick Preview' DOES allow to edit records. But I'm not able to filter it, probably because the quick preview record set doesn't include the record I need.



SysOp wrote:
Also if it can recognize table primary key, a little key icon should be painted over the header of the primary key columns. Here is how it appears on my screen



Fri Aug 18, 2023 11:01 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
In that Quick Preview, right-click the grid and select Retrieve All command. This will retrieve all records, Quick Preview stops after first 100.
Warning: this is not recommended for large tables as it will pull the entire table into memory.
Fri Aug 18, 2023 12:50 pm View user's profile Send private message
SqlExplorer



Joined: 18 Sep 2011
Posts: 103
Country: United States

Post Reply with quote
Unfortunately, some of the tables are fairly large.

I can continue to just do UPDATEs if need be, or use Sql Developer in rare instances.


SysOp wrote:
In that Quick Preview, right-click the grid and select Retrieve All command. This will retrieve all records, Quick Preview stops after first 100.
Warning: this is not recommended for large tables as it will pull the entire table into memory.

Fri Aug 18, 2023 9:25 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.