Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

suggest a username query

555805Jan 11 2007 — edited Jan 13 2007
Here is a fun one, for which I'm hoping there is a short and fast answer -

I'd like to make a username suggestion stored procedure. The input is IN_K_Username Varchar2(50). The procedure would output the first username that looks like dgarcia1 or dgarcia2 etc that is not found in the table K_Users. If IN_K_Username contains numbers at the end (such as dgarcia1234), they should be truncated before looking for a suggestion.

This procedure would only be called if the username the user originally wanted (IN_K_Username) was already taken, so I don't need to check for that.

I'm just starting with PL/SQL so any hints will be greatly appreciated! We are using Oracle 9i (or something like that).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2007
Added on Jan 11 2007
3 comments
649 views