As Jeffrie said, seeing some screenshots or sample data would help.
Depending on what you're trying to do, you might be able to use something like DENSE_RANK. For example, the following query pulls from NAMES and gives each person a unique row number, now matter how many name types they have (so, the first person gets DENSE_RANK 1, second 2, etc.)
SELECT N.EMPLID, N.NAME_TYPE, N.NAME, DENSE_RANK() OVER (ORDER BY N.EMPLID) AS row_dense_rank
FROM PS_NAMES N
WHERE N.EMPLID IN ('1234567', '2345678', '3456789')
AND N.EFFDT = (SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE N_ED.EMPLID = N.EMPLID AND N_ED.NAME_TYPE = N.NAME_TYPE AND N_ED.EFFDT <= SYSDATE)
ORDER BY N.EMPLID, N.NAME_TYPE;
Sample output from the above:
1234567 PRF Doe, Jane 1
1234567 PRI Doe, Jane 1
2345678 PRF Doe, John 2
2345678 PRI Doe, John 2
3456789 PRF Doe, Judy 3
3456789 PRI Doe, Judy 3
RANK() works similarly except it gives results of 1, 1, 3, 3, 5, 5
------------------------------
Tim Weston
Administrative Applications Programmer/Analyst
Virginia Community College System
------------------------------