I am using Oracle HR. Write a query to display the last name of employees, length of the name, and first monday since the hire date. Make the query that the user is prompted to enter a letter that the last name start with by using a substitution variable for the letter. For example, if the user enters "H" or "h" when prompted, the output should show all employees whose start with letter H and make sure that the case of the entered letter does not affect the out. So far I got:
SELECT last_name AS "Name", LENGTH(last_name) AS "Length",
NEXT_DAY(hire_date, 'MONDAY') AS "First Monday"
FROM Employees
WHERE &start_letter = 'start_letter%';
SELECT last_name AS "Name", LENGTH(last_name) AS "Length", NEXT_DAY(hire_date, 'MONDAY') AS "First Monday" FROM Employees WHERE UPPER(&start_letter) = UPPER(SUBSTR(last_name, 1, 1));
************************************************** Thanks for your question. We try our best to help you with detailed answers, But in any case, if you need any modification or have a query/issue with respect to above answer, Please ask that in the comment section. We will surely try to address your query ASAP and resolve the issue.
Please consider providing a thumbs up to this question if it helps you. by Doing that, You will help other students, who are facing similar issue.
Get Answers For Free
Most questions answered within 1 hours.