Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set field value to null

Former Member
0 Kudos

Hi - I have appended a single character flag field to table equi (using the append structure) - Using a select statement I can return all records where this field has nt been populated by using the select statement:

select * from equi where zz_flag is null

However if I populate the field BUT then want to return it to null I am unable to do so i.e.

update equi set zz_flag = null where zz_flag = 'X'

returns the error 'Field NULL is unknown' . Using CLEAR sets the field to an empty string. How do I set this field back to NULL? Thanks

6 REPLIES 6

Former Member
0 Kudos

Try Using update equi set zz_flag = <b>' '</b> where zz_flag = 'X'.

Instead of null, give space in quotes.

Best Regards,

Vibha

*Please mark all the helpful answers

anversha_s
Active Contributor
0 Kudos

hi,

update equi set zz_flag = <b>space</b> where zz_flag = 'X'

rgds

Anver

Message was edited by:

Anversha s

Former Member
0 Kudos

Hi

Give 'Null' in single quotes. May be u will get it.

Regards

Haritha

Former Member
0 Kudos

hi,

update equi set zz_flag = ' ' where zz_flag = 'X'

Former Member
0 Kudos

hi,

pls try in this way :

update equi set zz_flag = space where zz_flag = 'X'

Former Member
0 Kudos

Hi,

u cant directly set the value for flag field as NULL as its taking only one char field

bcoz there is such kind of value NULL in SAP

either u set as ' ' .

Or difine the value range at domain level for flag field like ' ' for NULL and X for not NULL as giving the des NULL

Then u can try with

select * from equi where zz_flag = ' ' .

Regs

Manas Ranjan Panda