0

Question:
Write commands to declare character variables named faculty_last_name, faculty_first_name, and faculty_phone. Assign the value ‘COX’ to faculty_last_name, ‘KIM’ to faculty_first_name, and 7155551234 to faculty_phone. Write program commands so that the program displays the output exactly as follows:

Kim Cox’s phone number is (715) 555-1234.

everyone can teach me???

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by anatolse
0
declare
    faculty_last_name   varchar2(80) := 'COX';
    faculty_first_name  varchar2(80) := 'KIM';
    faculty_phone       varchar2(80) := '7155551234';
begin
    dbms_output.put_line 
    (
        initcap(faculty_first_name) || ' ' || initcap(faculty_last_name) || '''s phone number is (' || 
        substr (faculty_phone, 1, 3) || ') ' ||
        substr (faculty_phone, 4, 3) || '-' ||
        substr (faculty_phone, 8, 4)
    );
end;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.