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 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started