I am using DB2v9.1.0.356 . I am trying to retrieve the DB2 users whose name ends with "R" , using the following query.
SELECT DISTINCT GRANTEE FROM SYSIBM.SYSDBAUTH where GRANTEE like '%R' or GRANTEE = '%R'
This query returns only those names which has more than eight characters; like ADMINISTRATOR , DAVIDROGER etc , but doesn't returns user names having less than eight characters like USER , ROGER.
But if query the DB to retrieve users starting with R using the following query it returns all matching results , irrespective of number of characters.
SELECT DISTINCT GRANTEE FROM SYSIBM.SYSDBAUTH where GRANTEE like 'R%' or GRANTEE = 'R%'
It returns users like ROGER , REYNOLD etc.
Please advise!