on 09-05-2013 1:41 PM
HI,
An sql query to get the count of the distinct records gives different output when executed from SAP GUI and from DB(sql server management studio 2008).
SAP GUI :
From SQL command editor ,the follwoing qurey gives the output as "515939"
SELECT count(DISTINCT OBJNR) AS c
FROM COEP
WHERE MANDT = '010' AND OBJNR <> 'NV%'
Sql Server Management Studio :
The below query when executed in sql server management studio 2008,gives the result "497411"
select COUNT(DISTINCT OBJNR) from <SID>.COEP where MANDT= '010' and OBJNR NOT LIKE 'NV%'.
Can anyknow help me to know the reason for this.
Thanks,
Sudhakaran
Hello
I believe the argument <> means NOT EQUAL to where as in the second query you are using the LIKE operator with NOT.
Regards
RB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.