Go back to ContentsGo back to previous page

Data Edit Mode

Use this feature found in the Tree or in the Results Window to switch to the Data Edit Mode for a table.

The Data Edit Mode allows you to modify the contents of a table directly from a grid, so you don’t have to create an UPDATE or INSERT statement for editing/creating individual records.

How does it work?

While in the Data Edit Mode you use the arrow keys to move in the grid. You modify some of the values of a record (row) and when moving to a different record Dev4Snow immediately creates and executes an UPDATE statement for the record that you just left. The WHERE clause for this statement includes all of the columns found in the table –even if the table contains a Primary Key, since PKs in Snowflake are not enforced.

If you edit the last empty row when moving to a different row Dev4Snow creates and executes an INSERT statement.

Null values are represented with the word “NULL”. You can also type in the word “NULL” to modify the current value to it if the column allows null values.

When to use this feature?

  • When you need to modify just a few records in a table.
  • When you are testing something and you need to have some data quickly.

When NOT to use this feature?

  • When trying to remove fully duplicate records. Since this feature will execute an UPDATE statement that statement will apply to all of the records that have the same values thus it will not be useful to remove duplicates –you will be updating all of them ending up with the same duplicates but with different values. If you need to de-duplicate records right-click on a table in the Tree and use the option Script… > De-duplication of PKs or custom keys.  
  • When you need to modify multiple records using a condition. It is much more convenient to simply write an UPDATE statement manually with the given conditions and perform a mass modification.

How can I start the Data Edit Mode?

From the Tree menu use the following option:

Or alternatively, after running a query by using the Pencil icon in the Results Window: 

Why is the Pencil icon not available in some cases?

The Pencil icon –to start the Data Edit Mode- will be available only when these conditions are met:

  • The SELECT statement that generated the results is based on a table –not on a view.
  • The SELECT statement starts like this statement below and uses the star to retrieve all the fields:

select [distinct] [top <N>] * from <table>...

  • The SELECT statement should not include any Joins –it should be based on a single table.
  • The SELECT statement cannot include aggregate functions.