Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

"select count(*)" and "select single *" returns different result

$
0
0

Good day!

 

product version SAP ECC 6.0

oracle10

 

data transfers from external oracle db into customer tables using direct oracle db link

 

sometimes I get case with different results from 2 statements

 

*mytable has 10 rows

*1st statement

data: cnt type I value 0.

select count( * ) into cnt from mytable WHERE myfield_0 = 123 and myfield_1 = '123'.

*cnt returns 10 - correct

 

*2nd statement

select single * from  mytable WHERE myfield_0 = 123 and myfield_1 = '123'.

*sy-dbcnt returns 0

*sy-subrc returns 4 - incorrect, 10 rows are "invisible"

 

but

1. se16 shows correct row number

2. I update just one row from "invisible" rows using se16 and 2nd statement returns correct result after that

 

can not understand why

 

thank you in advance.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>