Display all columns and all rows from the customer table

Assignment Help PL-SQL Programming
Reference no: EM131544587

Assignment

A SQL server was installed during unit 1. The installation included SQL Server Management Studio Express. This tool is used to create and manage your database. The next step is to ensure that the installed software was configured correctly. An existing database is available for this purpose. Using an existing database will also enable you experiment with querying a database.
For this project, you will access a database to ensure your software was installed and configured properly. You will explore the SELECT statement by populating the tables with data and retrieve the data from the database tables.

• Task 1

o Download and install the AdventureWorks LT2012 database into the SQL environment. Unzip the file and store the data file and the log file into the Data folder within the folder Program Files (x86)/Microsoft SQL Server as follows:

- For 64-bit operating systems: copy the files into the folder:

C:/Program Files/Microsoft SQL Server/MSSQL11.SQLEXPRESS/MSSQL/DATA

- For 32-bit operating systems: copy the files into the folder:

C:/Program Files (x86)/Microsoft SQL Server/MSSQL11.SQLEXPRESS/MSSQL/DATA

- The folder listed above will already exist. This is where you installed the SQL software to in DB1.
- When trying to open the DATA folder, you may receive a message about concerns on accessing the folder. Click ‘continue' or ‘ok'

o After the files are saved, the database needs to be attached.

- Open Microsoft SQL Server Management Studio. In the Object Explorer window, right click on Databases, and select Attach.

- On the Attach Databases window, click the Add button.

- The Locate Files window will default to the DATA folder, where you just copied the files to. Select the AdventureWorksLT2012_Data.mdf file and click OK.

- Back in the Attach Databases window, just click OK.

- The AdventureWorksLT2012 database will now display in Object Explorer under Databases.

• Task 2

o Generate a database diagram for all the tables in the database.

- Include a screenshot of this diagram in your Word document.

• Task 3

o Write SELECT statements for the following questions:

- For each of these statements, include a screenshot of the SQL statements and results. Make sure to include the statement execution, including the resulting data.

1. Display all columns and all rows from the Customer table.

2. Display the ProductID, ProductNumber and ListPrice for all rows in the Product table.

3. Modify query 2 so that the column headings are as follows:

- "ID," "Number," and "List Price"

4. Display the CustomerID, full customer name, and Company Name for all customers in the Customer table. The full customer name would be shown by displaying the values separately from the necessary columns. Another optional, and more advanced, approach to show full customer name would be to combine the necessary columns and associate an alias.

5. Display the CustomerID, full customer name, and Company Name for all customers in the Customer table.

- Name the columns "ID," "Name," and "Company Name" (respectively), and sort the data by the company name.

Reference no: EM131544587

Questions Cloud

Decrypt the message with a different key : Is it possible to decrypt the message with a different key? Justify your answer. Do you agree with the statement of the message? Why or why not?
Produce balanced budget-about the property tax bill : Paragon is required to produce a balanced budget. Calculate their 2009 property tax bill.
Briefly identify the major problems facing the manager : Summarize the recommended plan of action and include a brief justification of the recommended plan.
How nurture play interactive roles in shaping behavior : Topic - Human Sexuality. Explain how nurture and nature play interactive roles in shaping behavior
Display all columns and all rows from the customer table : Display all columns and all rows from the Customer table. Display the ProductID, ProductNumber and ListPrice for all rows in the Product table.
Submit a functioning database : You need to submit a functioning database, plus, ERD (make sure it is not hand-drawn, make sure you got enough entities- anything less than 7 is simply)
What was the new deposit amount for last seven years : What was the new deposit amount for the last 7 years?
What is the nature of the world around us : Why is it possible to know anything at all? How do we know what is right or wrong? What is the meaning of human history?
Define the projected net income : A proposed new investment has projected sales of 650,000 variable cost are 65 percent of sales, what is the projected net income.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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