| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Spring 2014 COP4709 Assignment 6

Page history last edited by Dr. Ron Eaglin 10 years, 2 months ago

 Assignment 6 - Cursors

 

Objectives

 

Use a cursor in a stored procedure

 

Assignment

 

You will be creating a simple stored procedure that uses one or more Cursors  - name the stored procedure sp_DisplayMenu. You may develop multiple stored procedures to achieve this.

 

The stored procedure should accept a single argument - the title of the menu, it will need to find all menu items that match the name (including partial match). For example if you have Chilis Lunch Menu and Chilis To Go Menu - if Chili is passed to the procedure it will show the items from both menus.

 

In this stored procedure you create a Cursor that scrolls through each MenuItem. For each Item you will produce an output using PRINT that displays MenuGroup and Menu Item as PRINTED output. Note that you will need to change the output screen to text to allow the print to work (Right Click in Query Window, Results, Results to Text).

 

You output should look something like this

 

Menu: Chilis To Go Menu

  Menu Group: Appetizer

 

Item: Triple Dipper

Description:

Combine your 3 favorite appetizers!
Served with dipping sauces.
 Big Mouth® Bites
 Boneless Buffalo Wings
 Boneless Honey-Chipotle Wings
 Southwestern Eggrolls
 Original Chicken Crispers®
 Loaded Potato Skins
 Hot Spinach & Artichoke Dip

 

Item: California Grilled Chicken Flatbread

Description:

Topped with grilled chicken, applewood smoked bacon,

tomato sauce, Monterey Jack, mozzarella, chopped cilantro,

house-made pico de gallo, fresh sliced avocado

& a drizzle of roasted garlic aioli.

 

    (repeats report for all matching menu items)

 

 

 

You will turn in the text of the stored procedure and a screen capture of the execution of this with results.

 

Information

 

The video and weekly reading on cursors should be sufficient for this assignment.

 

Estimated Completion Time

 

5 hours to cover cursors and write all the necessary stored procedures.

 

Supporting Lectures 

 

 

Questions and Answers

 

 

External Resources

 

Grading Criteria

 

 

Comments (0)

You don't have permission to comment on this page.