For Online Class Help or Private Tutoring Service email us at [email protected] or WhatsApp us at +1 (781) 656-7669

Homework Provider

 
  • Take My Class
  • Take My Exam
  • How It Works
  • Solutions
    • Questions
  • Testimonials
  • Blog
  • Who Are We
  • Contact Us
  • Take My Class
  • Take My Exam
  • How It Works
  • Solutions
    • Questions
  • Testimonials
  • Blog
  • Who Are We
  • Contact Us
  1. Home
  2. Questions
  3. Murach’s SQL for SQL Server – Exercise 14 – Guaranteed 100% score

Murach’s SQL for SQL Server – Exercise 14 – Guaranteed 100% score

1. Create a stored procedure in the AP database named spWhichTable that accepts a
column name and returns the name of the table or tables that have a column by that
name. Code a statement that calls the procedure.

2. Create a stored procedure named spBalanceRange that accepts three optional
parameters. The procedure returns a result set consisting of VendorName,
InvoiceNumber, and Balance for each invoice with a balance due, sorted with largest
balance due first. The parameter @VendorVar is a mask that’s used with a LIKE
operator to filter by vendor name, as shown in figure 14-5 of the text. @BalanceMin
and @BalanceMax are parameters used to specify the requested range of balances
due. If called with no parameters, the procedure should return all invoices with a
balance due.

3. Code three calls to the procedure in exercise 2:
(1) passed by position with @VendorVar=’Z%’ and no balance range
(2) passed by name with @VendorVar omitted and a balance range from $200 to
$1000
(3) passed by position with a balance due that’s less than $200 filtering for vendors
whose names begin with C or F

4. Create a stored procedure named spDateRange that accepts two parameters,
@DateMin and @DateMax, with data type varchar and default value null. If called
with no parameters or with null values, the procedure should return an error message
describing the syntax. If called with non-null values, validate the parameters. Test
that the literal strings are valid dates and test that @DateMin is earlier than
@DateMax. If the parameters are valid, return a result set that includes the
InvoiceNumber, InvoiceDate, InvoiceTotal, and Balance for each invoice for which
the InvoiceDate is within the date range, sorted with earliest invoice first.

5. Create a scalar-valued function named fnUnpaidInvoiceID that returns the InvoiceID
of the earliest invoice with an unpaid balance. Test the function in the following
SELECT statement:
SELECT VendorName, InvoiceNumber, InvoiceDueDate,
InvoiceTotal – CreditTotal – PaymentTotal AS Balance
FROM Vendors JOIN Invoices
ON Vendors.VendorID = Invoices.VendorID
WHERE InvoiceID = dbo.fnUnpaidInvoiceID()

6. Create a table-valued function named fnDateRange, similar to the stored procedure
of exercise 4. The function requires two parameters of data type smalldatetime.
Don’t validate the parameters. Return a result set that includes the InvoiceNumber,
InvoiceDate, InvoiceTotal, and Balance for each invoice for which the InvoiceDate
is within the date range. Invoke the function from within a SELECT statement to
return those invoices with InvoiceDate between April 10 and April 20, 2002.

7. Use the function you created in exercise 6 in a SELECT statement that returns five
columns: VendorName and the four columns returned by the function.

8. Create a trigger for the Invoices table that automatically inserts the vendor name and
address for a paid invoice into a table named ShippingLabels. The trigger should fire
any time the PaymentTotal column of the Invoices table is updated. The structure of
the ShippingLabels table is as follows:
CREATE TABLE ShippingLabels
(VendorName varchar(50),
VendorAddress1 varchar(50),
VendorAddress2 varchar(50),
VendorCity varchar(50),
VendorState char(2),
VendorZipCode varchar(20))

take-my-online-class-thumbnail
Play Video
pay-someone-to-take-my-online-class

Name: Jennifer Lucas
Status: Online ⬤
Classes Taken: 3878
Ratings: ⭐⭐⭐⭐⭐

Hire Me

STATUS

9. A column that accepts null values but has a unique constraint can only have a single
row with a null value. Write a trigger that prohibits duplicates, except for nulls. Use
the following table. If an INSERT or UPDATE statement creates a duplicate value in
the NoDupName column, roll back the statement and return an error message.
CREATE TABLE TestUniqueNulls
(RowID int IDENTITY NOT NULL,
NoDupName varchar(20) NULL)

Facebook
Twitter
Reddit
Pinterest
WhatsApp
Email
pdf-answers
Get Solved Answers
$2.99
Add to cart

GET QUICK PRICE ESTIMATE FOR THIS TASK

WHY CHOOSE US

  • Over 300 Experts to Work on Your Papers
  • 100% Privacy and Confidentiality
  • Amazing Discounts and Special Offers
  • Delivery within Every Deadline Level
  • Secure Payment Process
  • High-Quality Papers
  • 24/7 Live Customer Support
  • Free Revisions If Required
  • Fair & Cheap Prices
  • Rated 4.9/5 By Students

COMPLETED TASKS

SOCS 325 Week 8 Final Exam (Version 2)

July 13, 2020

SOCS 325 Week 8 Final Exam (Version 1)

July 13, 2020

SOCS 325 Week 8 Final Exam (Collection)

July 13, 2020

SOCS 325 Week 8 Collaborative Group Project Discussion

July 13, 2020

SOCS 325 Week 7 Bundle: Assignments + Group Project + Discussions

July 13, 2020

SOCS 325 Week 6 Bundle: Assignments + Discussions

July 13, 2020

SOCS 325 Week 5 Bundle: Assignments + Discussions

July 13, 2020

SOCS 325 Week 4 Midterm (Version 4)

July 13, 2020

Homework Provider

Facebook-f Twitter Pinterest Whatsapp Reddit Envelope

WE ACCEPT

PayPal
VISA Light
AMERICAN EXPRESS LIGHT
Bitcoin
  • Take My Online Class
  • Do My Case Study
  • Take My Online Exam
  • Online Class Help
  • Do My Homework
  • Take My Online Test
  • Original Homework Help
  • Premium Plagiarism Checker
  • Take My Midterm Exam
  • Research Paper Writing
  • Case Study Writing Help
  • Dissertation Writing Service
  • Online Coursework Help
  • Pay Someone To Write My Paper
  • Pay For Online Classes
  • Programming Classes Help
  • MyMathLab Answers
  • MyStatLab Answers
  • MyAccountingLab Answers
  • Need Help With Online Class
  • Cheap Assignment Help
  • Write My Online Essay
  • Online Student Problems
  • Math Homework Help

Contact Us

  • [email protected]
  • WhatsApp (781) 656-7669
  • twitter.com/hwp_helper
  • fb.com/homeworkprovidercom
  • Privacy Policy
  • Terms of Use
  • DMCA
  • Cookie Policy
  • Money Back Guarantee
  • Premium Plagiarism Checker
  • Contact Us

HomeworkProvider.com is not endorsed or affiliated by any university or college. The services provided are meant to assist the client by providing a guideline and the product provided is intended to be used for research or study purposes.

© 2013-2020 HomeworkProvider. All rights reserved.

ORDER THIS
WHATSAPP

Yay! You are just one step away to get rid of homework stress

  • How It Works
  • Testimonials
  • We are committed to ensuring that your information is secure with us
hire-an-expert-to-do-my-exam

Don't Waste Your Time Searching For Old Plagiarized Courses

Get Your Job Done By Our Anonymous Quality Experts

  • How It Works
  • Reviews
  • 24/7 Support
doc icon homework provider

CIS 155 Lab Help, Leslie​
Thank you for doing my CIS 115 lab. Homework Provider is the best.

Rated By Client
 5/5
doc icon homework provider

Dream Service, William
Thanks God, you came to my rescue. Thanks for your help.

Rated By Client
 5/5
doc icon homework provider

Mind blowing service, Eddie
I could have failed quite a few exams if you guys did not help me

Rated By Client
 5/5
doc icon homework provider

Got A grade in final exam, John
I still couldn’t believe I got an A grade in my exam. Highly vouched service.

Rated By Client
 5/5
doc icon homework provider

Linda, opted for private tutoring
Subscribed to get online class help for devry acct 212 week 1-8 class​​

Week 5 65%
doc icon homework provider

Acct Course Project, Ryan
Thanks a lot to my writer who followed all my requirements.

Rated By Client
 5/5
xls-icon

Genuine service, Steven
The research paper was much more than I expected! Thanks a lot.

Rated By Client
 4.5/5
doc icon homework provider

Karen, opted for private tutoring
Subscribed to get online class help for liberty BUSI 536 week 1-8 class.

Week 7 88%
doc icon homework provider

Marcus, opted for private tutoring
Subscribed to get online class help for ashford psy week 1-5 class.

Week 3 58%
doc icon homework provider

I got A grade in class, Amanda
with the help of homework provider I made it to pass my acct 505 class.

Rated By Client
 5/5