How to find a userid
search cancel

How to find a userid

book

Article ID: 129224

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

How do you search the list of users for a specific user's name and find their userid?

Environment

CA Harvest SCM All versions and platforms
Oracle database

Resolution

Here’s an SQL query that will return all users with names containing a certain set of letters:

SELECT USERNAME, REALNAME FROM HARUSER WHERE LOWER(REALNAME) LIKE '%xyz%';

In Oracle, the wildcard character is “%”.  So the above would look for any user whose real name contain the letters “xyz”.  The “LOWER()” function used in the query converts the real name stored in the database to all lower case characters to make searching easier – you don’t have to guess which characters are upper case or lower case, just enter what you’re searching for all in lower case. 

So to use this, replace “xyz” in the above query with letters in the user’s name you’re looking for and it will return all users matching that pattern.Here’s an SQL query that will return all users with names containing a certain set of letters: SELECT USERNAME, REALNAME FROM HARUSER WHERE LOWER(REALNAME) LIKE '%xyz%'; In Oracle, the wildcard character is “%”. So the above would look for any user whose real name contain the letters “xyz”. The “LOWER()” function used in the query converts the real name stored in the database to all lower case characters to make searching easier – you don’t have to guess which characters are upper case or lower case, just enter what you’re searching for all in lower case. So to use this, replace “xyz” in the above query with letters in the user’s name you’re looking for and it will return all users matching that pattern.