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!

PL/SQL Input Name String Format

430055Oct 1 2004 — edited Oct 1 2004
I am trying to accept a user input name string through a PL/SQL substitution variable. I am trying to get the input string to conform to the following format:

FIRST_NAME LAST_NAME TITLE

This is a portion of my code:

ACCEPT strname PROMPT 'Please enter your first name, last name, and title:'

DECLARE
str_name VARCHAR2(100) := '&strname';

I am also trying to generate an exception if any of the three components of the input strings are missing.

I tried using the TO_CHAR function with a format mask. This does not work.

Does anyone have other ideas??

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2004
Added on Oct 1 2004
1 comment
331 views