Question: 9. (10 pts) Write a SELECT statement that returns six columns, based on the eqpTotalValue field in the EQUIPMENT table: a. The eqpDescription should display

9. (10 pts) Write a SELECT statement that returns six columns, based on the eqpTotalValue field in the EQUIPMENT table: a. The eqpDescription should display in the first column b. The original eqpTotalValue should display in the second column c. Use the CAST function to return the eqpTotalValue in the third column as data type decimal with 2 digits to the right of the decimal point d. Use the CAST function to return the eqpTotalValue in the fourth column as a varchar e. Use the CONVERT function to return the eqpTotalValue in the fifth column as decimal with 2 digits to the right of the decimal point f. Use CONVERT to return the eqpTotalValue in the sixth column as varchar, using style 1 g. Use a $ to display on the left of the value where possible (HINT: concatenation) h. Use appropriate descriptive column alias names i. The highest eqpTotalValue should display at the top of the result set 10. (10 pts) Write a SELECT statement that returns six columns based on the empFirstName, empLastName and EmpDateOfBirth fields in the EMPLOYEE table: a. The employee first and last names concatenated with a space between the name parts b. Use the CAST function to return the first column as a data type varchar c. Use EmpDateOfBirth and the CONVERT function to return the second, third and fourth columns as a varchar, using style 1,7 and 10 respectively. d. Use the EmpDateOfBirth and the CAST function to return the fifth column as data type real e. Display the unformatted empDateOfBirth as the sixth column f. Use appropriate descriptive column alias names g. The oldest employee should be listed at the top of the result set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
