I think he wants to know which user didn't log in correctly.
"NOTAUSER" won't let him know to call Marge Smith and ask her if she's just clumsy on the keyboard or someone is trying to hack the system using her username.
Unless "NOTAUSER" is just a dummy-value you made up for the example?
Instead of coding this by hand, why not just leverage the provided functionality?
SQL> connect notauser/notmypass@mydb ERROR: ORA-01017: invalid username/password; logon denied
Wolfgang Breitling Centrex Consulting Corporation www.centrexcc.com -- http://www.freelists.org/webpage/oracle-l