views:

1722

answers:

4

Hi, Oracle SQL Developer allows you to update field values directly to the table without needing to write a sql script. However it doesnt allow you to set a null value for a field? the update script that gets generated is below : UPDATE "TABLE" SET field_required = 'null' WHERE ROWID = 'AAAnnZAAFAAAGMfAAC' AND ORA_ROWSCN = '14465324'

Any idea how to set a null value to a field in the table without writing an update statement ?

A: 

Some tools use <ctrl+0> to enter a NULL value.

Magne
That didnt work
Cshah
A: 

Hi Cshah,

there is a setting in tools -> preferences -> Database -> advanced settings that allows you to reset the default display of NULL columns. If you set it to blank that will probably solve your issue.

Vincent Malgrat
Nope. This just toggles the display to blank. It doesnt solve. Below are the scripts that run when i do the intended null update UPDATE "DEPARTMENT" SET NAME = 'cgh' WHERE ROWID = 'AAAoA8AAFAAAHk2AAA' AND ORA_ROWSCN = '14471109' Commit Successful UPDATE "DEPARTMENT" SET NAME = WHERE ROWID = 'AAAoA8AAFAAAHk2AAA' AND ORA_ROWSCN = '14471114' One error saving changes to table "DEPARTMENT": Row 1: Invalid column index: getValidColumnIndex. I see the above error when I deleted all the letters in the field and tried to commit the data
Cshah
A: 

Do you mean editing in the data tab? Just insert an 'empty' string, which in oracle is equal to null.

Set "Display null value as" to (null) in tools -> preferences -> Database -> advanced settings

create table ff (v VARCHAR2(1));

INSERT INTO FF VALUES ('1');

Select table and select data tab.

This shows

V
=
1

Now double click the value 1 and delete the 1. Commit generates this statement in log:

UPDATE "OSIVOLG"."FF" SET V =  WHERE ROWID = 'AAA+zcAAFAAF9rgAAA' AND ORA_ROWSCN = '77536476584'

Which is syntacticly not a valid SQL statement but data tab now shows.

V
======
(null)
Robert Merkwürdigeliebe
Still not working. I tried deleting a value from help tables which are pre-installed when a new db is created. Below is the logsUPDATE "SYSTEM"."HELP" SET INFO = WHERE ROWID = 'AAACfmAABAAAG66AAL' AND ORA_ROWSCN = '169734'One error saving changes to table "SYSTEM"."HELP":Row 12: Invalid column index: getValidColumnIndex
Cshah
Either you don't have privileges to update that table or your db is hosed. Try updating a table in a regular user schema. I just updated that table in my DB with no problem, but it's a user that does have DBA privileges.
DCookie
Robert Merkwürdigeliebe
+4  A: 

What version are you using? I've got 1.5.4 right now and it works perfectly. Just click the value and hit delete, then commit.

DCookie
Presently,I use 1.5.4 and today morning installed the latest updates. Now it works. My Version is 1.5.4 Build MAIN-5940Thanks
Cshah