Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  1. 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

  1. 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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago