TheodoreJohnson_CBT NUGGETS LAB 27_28_29_CIS376

docx

School

Strayer University, Tampa *

*We aren’t endorsed by this school

Course

376

Subject

Information Systems

Date

Dec 6, 2023

Type

docx

Pages

10

Uploaded by DeanChinchillaPerson22

Report
LAB 27: Creating Views Theodore Johnson SU200641522 Screenshot 1: Using the AdventureWorks database and the Production schema create a view that returns Name from the Products table, Name from the ProductCategory table, Name from the ProductSubCategory table, and Quantity from the ProductInventory table. Use appropriate aliases for the columns. Inspect the tables to determine the join conditions. Take a screen shot of the SQL windows and results and paste it here. Screenshot 2: Write a query to select rows from the above view returning only rows where the name in the ProductSubCategory table contains ‘bikes’. Take a screen shot of the SQL windows and results and paste it here.
Screenshot 3: Alter the view created in Part 1 to include the ListPrice from the Products table and only returns rows with a ListPrice greater than 2000 dollars. Take a screen shot of the SQL windows and results and paste it here.
Screenshot 4: Write a query to select rows from the above view returning only rows where the ListPrice is greater than 2000 but less than 3000 dollars. Take a screen shot of the SQL windows and results and paste it here.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
LAB 28: Creating User-defined Functions Theodore Johnson SU200641522 Screenshot 1: Using the WideWorldDistributors database and the Sales schema create a function that takes InvoiceID as an input parameter and returns all the rows from the table InvoiceLines for the InvoiceID value passed into the function. If the result is a NULL return a zero. Take a screen shot of the SQL windows and results and paste it here. Screenshot 2: Using the WideWorldDistributors database and the Sales schema write a query that returns InvoiceID, InvoiceDate and CustomerPurchaseOrderNumber from the table Invoices and the result of the above created function. Take a screen shot of the SQL windows and results and paste it here.
Screenshot 3: Using the AdventureWorks database and the Production schema create a function that takes ProductId as an input parameter and returns the results of a query that retrieves ProductID, Name, Color, Weight, and DaysToManufacgture from the table Product. Take a screen shot of the SQL windows and results and paste it here.
Screenshot 4: Using the AdventureWorks database and the Production schema write a query that returns the results of the function in Part 3 for ProductID 320. Take a screen shot of the SQL windows and results and paste it here. Screenshot 5: Using the AdventureWorks database and the Production schema write a query that returns the results of the function in Part 3 for ProductID 15. Take a screen shot of the SQL windows and results and paste it here.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
LAB 29: Creating Stored Procedures Theodore Johnson SU200641522 Screenshot 1: Using the AdventureWorks database and the Production schema create a stored procedure that returns Name from the Product table, Name from the ProductCategory table, Name from the ProductSubCategory table, and Quantity from the ProductInventory table. Use appropriate aliases for the columns. Inspect the tables to determine the join conditions. Take a screen shot of the SQL windows and results and paste it here. Screenshot 2: Execute the above stored procedure. Take a screen shot of the SQL windows and results and paste it here.
Screenshot 3: Alter the stored procedure created in Part 1 to include the ListPrice from the Product table and only returns rows with a ListPrice greater than 2000 dollars. Take a screen shot of the SQL windows and results and paste it here.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Screenshot 4: Execute the above store procedure. Take a screen shot of the SQL windows and results and paste it here.