Question: Write a SELECT with no FROM and parse the four digit year from the date/time on the server. For the GETDATE must use the 101
- Write a SELECT with no FROM and parse the four digit year from the date/time on
the server. For the GETDATE must use the 101 format for the CONVERT. Use string
functions to isolate and extract the four digit year. Dont hard code of positions, lengths, etc.
Use 1 as the starting position if necessary. You can use the REVERSE() function.
| Year |
| 2021 |
- Use the concatenation operator, string functions and the GETDATE function.
Write a no FROM clause SELECT to display the current date time in the following format. Dont
Hard code the positions, lengths, etc. You can use 1 as the starting position if necessary. For example, the date time on the server is 1/21/2021 5:38 PM then the output should be:
5:38PM 2021 Jan 21
3. Lets assume you have a table named Emp. Write a select statement using the Emp table which gives each employee a %10 raise over the existing salary. The Emp table is shown below.

Output must look like the following:
| New Salary |
| Donald Jacksons new salary is: Unable to calculate new salary |
| George Johnsons new salary is: $100,000.00 |
| Michael Stevens new salary is: 95,000.00 |
| Robert Plants new salary is: Unable to calculate new salary |
Empld 1 2 WNP LaseName Jackson JohnsonSteven Salary NULL FirstName Donald George Michael Robert Deptid 1 4 5 3 4 Plant NULL NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
