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 - 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 ValidToStep 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