Application Development and Automation 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: 
Read only

Retrieve not empty data

Former Member
1,486

I would like to query a data specify the field is not empty, like

Select ... from bseg where

augdt <> ''.

if i use <>'', the query seems is not my expected. how can i do that. Thanks!

6 REPLIES 6
Read only

former_member189059
Active Contributor
0 Likes
1,301

try using NE instead of <>

Read only

Former Member
0 Likes
1,301

use <b>INITIAL or NULL</b> instead of ''.

Also use <b>NE</b> instead of <>.

Please reward if useful.

Read only

Former Member
0 Likes
1,301

Hi ,

You can use

Select ... from bseg where

augdt ne space.

Regards

Arun

Read only

0 Likes
1,301

This being a date fields Use <b>AUGDT NE '00000000'</b>. This will do

Message was edited by:

Mohammed Jaleel

Message was edited by:

Mohammed Jaleel

Read only

Former Member
0 Likes
1,301

Hi,

Try to use this :

Select ... from bseg.

if audgt is not initial.

do the processingt

endif.

Regards,

Hemant

Read only

varma_narayana
Active Contributor
0 Likes
1,301

Hi ..

You can write like this...

SELECT <FIELDS> FROM BSEG

WHERE AUGDT IS NOT INITIAL.

or

SELECT <FIELDS> FROM BSEG

WHERE AUGDT ne SPACE.

<b>Note: </b>BSEG is a Cluster table . so the Where condition is allowed only on the Primary key.

REWARD IF HELPFUL.