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

 in sql server . the database table is above. Question #4

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!