Irn this assignment you will write a script that demonstrates how to use a table variable.
Use your credentials for our classroom db server. 1. Create a schema to model this story: It Hollywood Week on American Idol An American Idol contestant will sing zero or more songs during the competition. A particular song will be sung by one or more contestants. A contestant will sing a particular song on a particular date.
Your schema should track contestants, songs, and songs sung by each contestant.
2. Write a script that uses a table variable to hold the results of joining the tables in order to get this report:
Contestant Song Date Sung Kelly Clarkson Row Your Boat 1/1/2005 Kelly Clarkson Happy Birthday 2/2/2010 Clay Aiken Star Spangled Banner 1/1/2004 Clay Aiken Row Your Boat 2/2/2009 Justin Bieber Battle of 1812 3/3/2010
You are not writing the report. You are demonstrating the use of table variables in a script to provide the data for the report-
3. In a Word Doc, paste in a. your complete script as text, b. screen snips of your table schemas, c. screen snips of yoiur table contents, and d. screen snips demonstrating the execution of your script 4. Upload your Word Doc here. Do not zip it Use our naming convention for the Word Doc. Incorrectly named and incorrectly submitted submissions will not be graded.
The post How to use a table variable appeared first on My blog.