Question: Code a statement that calls the following stored procedure and passes the values 2011-12-01 and 122 to its input parameters. Pass the parameters by name
Code a statement that calls the following stored procedure and passes the values 2011-12-01 and 122 to its input parameters. Pass the parameters by name in the reverse order that theyre declared in the procedure. CREATE PROC spInvoiceTotal1 @DateVar smalldatetime, @VendorID int AS SELECT SUM(InvoiceTotal) FROM Invoices WHERE VendorID = @VendorID AND InvoiceDate >= @DateVar; ______________________________________________________________________________
Question 9
Code a statement that calls the following stored procedure, passes the value 2011-12-01 to its input parameter, and stores the value of its output parameter in a variable named @MyInvoiceTotal. Assume that the @MyInvoiceTotal variable has already been declared, and pass the parameters by position. CREATE PROC spInvoiceTotal2 @DateVar smalldatetime, @InvoiceTotal money OUTPUT AS SELECT @InvoiceTotal = SUM(InvoiceTotal) FROM Invoices WHERE InvoiceDate >= @DateVar; ______________________________________________________________________________
10 points
Code a statement that returns the value of a variable named @InvoiceCount from a stored procedure named spInvoiceCount. _____________________________________________________________________
Question 11
Code a statement that executes a stored procedure named spInvoiceCount and stores its return value in a variable named @InvoiceCount. Assume that the @InvoiceCount variable has already been declared and that the stored procedure doesnt accept any parameters. _____________________________________________________________________
Question 12
Before you can pass a table to a stored procedure or a function as a parameter, you must use the ______________________ statement to create a user-defined table type.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
