Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in sql server . the database table is above. Question #4 - 8 points Write a query that returns all employees - 19 rows, using

image text in transcribed

in sql server . the database table is above.

Question #4 - 8 points

Write a query that returns all employees - 19 rows, using the isEmployee field equal to 1. Return the personID, their logon name, phone number, and name.

For the name, you need to rearrange the name stored in the FullName column to be in the format: John, Brown (last name a comma, a space, then the first name)

For the phone number, remove all the non-numeric characters and reformat it to look like:

801.112.2345

For the logon name, concat. the person id to the end of the logon, seperated by a space, then a dash, then a space (hudsono@wideworldimporters.com - 3)

Sort the final results based on your new name field, a to z

People (Application) 9 PersonlD FullName PreferredName SearchName IsPermittedToLogon LogonName IsExternalLogonProvider HashedPassword IsSystemUser IsEmployee IsSalesperson UserPreferences Phone Number FaxNumber EmailAddress Photo CustomFields OtherLanguages LastEdited By ValidFrom ValidTo People (Application) 9 PersonlD FullName PreferredName SearchName IsPermittedToLogon LogonName IsExternalLogonProvider HashedPassword IsSystemUser IsEmployee IsSalesperson UserPreferences Phone Number FaxNumber EmailAddress Photo CustomFields OtherLanguages LastEdited By ValidFrom ValidTo

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago