Skip to Content
0
Former Member
May 13, 2008 at 07:57 AM

false result when select with space

735 Views

Hi, I want to select all entries from a DB-table (in my example BUT000) where a customer field ist space. The problem ist, that both the select statement in my program and the request with SE11 come to the same incorrect result.

In my example there are more then 1mio entries in BUT000.

simple coding:

SELECT COUNT(*) FROM but000 INTO cnt

WHERE yfield EQ space.

The type of the customer field is CHAR 1.

Result with yfield EQ space -> 530 entries

Result with yfield NE space -> 0

Normally all entries are space and the correct result should be more the 1 mio.

The results in SE11 and in the smal program are the same. There is no change, when I use ' ' instead of space.

I have this problem only with enhanced customer fields. Selects of standard fields are correct.

After a new activation with DB-utility there is no change.

What is the problem with the customer fields - have anyone an idea? Thanks.