Return the empid firstname lastname for the employee

Assignment Help Database Management System
Reference no: EM13811208

Part 1-

Questions- Explain why the following query will give an error:

SELECT empid, firstname, lastname, DATEPART(year, hiredate) AS YearHired
FROM HR.Employees
WHERE YearHired = 2004;

You have a table named File with column FileName. You want to write a query that returns all rows for file names that begin with an underscore. Why is WHERE clause i) better than WHERE clause ii)?

i) WHERE FileName LIKE '!_%' ESCAPE '!'
ii) WHERE LEFT(FileName, 1)

Part 3

All queries use the TSQL2012 database unless otherwise indicated.

Label each query with its letter. Copy the query from the SQL Server Management Studio query window into your Assignment Word document. Then copy the results into the Word document. If the result set has more than 10 rows, you need only show the first five rows of the result set, plus an indication of how many rows were returned.

a. Query the HR.Employees table. The result set column headers should be Employee ID, Last Name, and First Name.

b. Return the empid, firstname, lastname, and city for the employee with empid 9.

c. Return a list of employee id's, last names, and first names for employees hired on or after January 1, 2004.

d. Retrieve the product name and unit price of all products that have unit price between $10 and $15. Use the BETWEEN keyword.

e. Retrieve the product id, product name, supplier id, and unit price of all products that are supplied by suppliers 2, 3, 16, or 19. Use the IN keyword. Return the results in order of largest to smallest unit price.

f. List the category name and description for all product categories that contain the character string 'ee' anywhere in the description. Use the LIKE keyword.

g. Retrieve the order id, order date, employee id, and ship (to) city of all orders for which the shipped date is unknown.

h. Write a query that returns the number of days old you are. Use the DATEDIFF function.

Reference no: EM13811208

Questions Cloud

Corporate culture within the organization : Choose a company and briefly describe its business and uniqueness in its industry. Now compare its management practices with the six principles described in Lecture 3. Is the company on the right track? Support your response with solid reasoning. ..
What is an example of a firm or organization : What is an example of a firm or organization you know about, which, in your opinion, has developed a strategy de facto? Explain.
Discuss implementation activities that positively impacted : Discuss implementation activities that positively impacted customer satisfaction? Describe three advantages and three disadvantages of standardizing the marketing mix worldwide?
Describe robert nardelli leadership style : Clearly describe Robert Nardelli's leadership style in terms of Leadership Theory, incorporating the following theories within your paper:
Return the empid firstname lastname for the employee : Return the empid, firstname, lastname, and city for the employee with empid 9. Return a list of employee id's, last names, and first names for employees hired on or after January 1, 2004. Retrieve the product name and unit price of all products that ..
Determine the radial temperature gradient : How deep, would you have to be below the rock surface to detect only a 10% change in temperature compared to the surface during the day? State your answers both in metres and in terms of a multiple of the skin depth.
Provide a description of the project : Provide a description of the project to your instructor. Outline how the project you choose meets the criteria found in the course project description. The more detail you provide, the better your instructor can determine whether or not your proje..
Sap and petrotrin overall enterprise : How has PMMM brought success to both SAP and Petrotrin's overall enterprise?  Use current financial, operational, and strategic news to support the article details for either SAP or Petrotrin to describe their recent results.
Inputs for the productivity improvements : Analyze the trade-offs between inputs for the productivity improvements. Analyze the advantages and disadvantages of global sourcing versus producing in the U.S.

Reviews

Write a Review

Database Management System Questions & Answers

  Design and implement a small database application

Perform the conceptual database design using Entity-Relationship model. You must submit the Entity-Relationship diagram of your database and develop queries in the target DBMS

  Develop a data model for the drip drip water company

You have been asked to develop a data model for the Drip Drip Water Company (DDWC). DDWC is the sole supplier of water to the citizens and businesses of the town of Drip Drip.

  Create a detailed erd using the data specificationsnoted

Use a Microsoft® Visio® diagram to create a detailed ERD using the data specificationsnoted in the Week Two Individual Assignment. Make any necessary changes provided in your faculty's feedback.

  Explain the security mechanisms available for a database

Be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides; citations and references must follow APA or school-specific format. Check with your professor for any additional instructions.

  Create database db2game

LOAD FROM "C:\db2game\tutors.csv" of del insert into tutors (student_id, given_name, family_name, course_code, hourly_wage, status);

  Number of leaf-level blocks needed if blocks are full

What is the order P of the B+-tree if B+-tree access structure on the key is constructed? What is the number of leaf-level blocks needed if blocks are approximately 69% full (round up for convenience)?

  A motor vehicle maintenance center wants to enhance its

write a 200- to 300-word short-answer response for the followinga motor vehicle maintenance center wants to improve its

  Write down a 350-word summary explaining two of the most

write a 350-word summary describing two of the most popular database vendors in the marketplace. answer the following

  Describe the components of a dbms

Describe a primary key, candidate key, secondary key, foreign key, and a combination key. Use your imagination to provide an example of each key that is not in the textbook.

  What is lan based database management system

What is lan based database management system give an example of lan based database management system with a company name

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Root cause of problem if databse doesn-t give information

Company's databases do not give them with information required for market planning, lead generation, and account management. What does author say is root cause of this problem?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd