11-18-2015 9:39 AM
Hi all,
I have got an issue when using native SQL.
I want to do case-insensitive fetching, so I am using native SQL.
In DB table, the data is like:
col1 col2
001
002
col1 is key and col2 has intial value.
In coding:
lv_abc = 'ABC'.
select col1 from table into :gs_xxx where (upper)col2 = :lv_abc.
Normally, you should have got no data.
But the odd thing is, I did get these 2 entries.
I have tried open SQL as well and I get nothing which is correct.
So I am wondering why native SQL would return the wrong data set.
11-18-2015 10:26 AM
I suppose those are not "initial" values (space, zeroes) but "null" values, so fulfill any check, try to add a criteria IS NOT NULL.
Regards,
Raymond
11-18-2015 2:05 PM
col2 is initial value. I have also tried SE11, and enter 'ABC' as search criteria and get nothing.
So why the data can be fetched if the where clause is col2 = 'ABC' in native SQL.
It's really strange.