You develop a Microsoft SQL Server 2012 database.
You need to create and call a stored procedure that meets the following requirements:
Accepts a single input parameter for CustomerID.
Returns a single integer to the calling application.
Which Transact-SQL statement or statements should you use? (Each correct answer presents part of
the solution. Choose all that apply.)

A.
CREATE PROCEDURE dbo.GetCustomerRating @Customer INT, @CustomerRatIng INT OUTPUT
AS
SET NOCOUNT ON SELECT @CustomerRating = CustomerOrders/CustomerValue
FROM Customers WHERE CustomerID = @CustomerID
RETURN
GO
B.
EXECUTE dbo.GetCustomerRatIng 1745
C.
DECLARE @customerRatingBycustomer INT
DECLARE @Result INT
EXECUTE @Result = dbo.GetCustomerRating
1745
, @CustomerRatingSyCustomer
D.
CREATE PROCEDURE dbo.GetCustomerRating @CustomerID INT, @CustomerRating INT OUTPUT
AS
SET NOCOUNT ON
SELECT @Result = CustomerOrders/CustomerValue
FROM Customers WHERE CustomerID = @CustomeriD
RETURN @Result
GO
E.
DECLARE @CustomerRatIngByCustcmer INT
EXECUTE dbo.GetCustomerRating @CustomerID = 1745,
@CustomerRating = @CustomerRatingByCustomer OUTPUT
F.
CREATE PROCEDURE dbo.GetCustomerRating
@CustomerID INT
AS
DECLARE @Result INT
SET NOCOUNT ON
SELECT @Result = CustomerOrders/CustomerVaLue
FROM Customers
WHERE Customer= = @CustomerID
RETURNS @Result
?
0
0
The correct answer is
F
0
0
In ‘d’ the variable ‘@Result’ is not declared, syntax error – wrong answer;
In ‘f’ the ‘RETURNS’ keyword is forbidden – syntax error;
The ‘a’ is correct answer for creating stored procedure, and its just one of two correct answers.
In ‘b’ procedure is invoked with only one parameter – wrong;
In ‘c’ – it won’t work.
The ‘e’ is correct BUT there is one misspelled word – should be ‘@Customer = 1745’ instead of ‘@CustomerID = 1745’. If this invoke parameter is changed it works like a charm.
Also as far as I remember, if procedure has declared variable as output, then when invoking this procedure you also should include the output keyword.
In my opinion, answers ‘A’ and ‘E’ are correct.
2
0
Correct answers are A and E (Ignoring Typo’s)
0
0
A and E are corrects
0
0
correct
0
0
AE
0
0
A and E, just there are many spelling mistakes; here is without them:
— A
CREATE PROCEDURE dbo.Getcustomerrating @CustomerID INT,
@CustomerRating INT OUTPUT
AS
SET NOCOUNT ON
SELECT @CustomerRating = CustomerOrders / CustomerValue
FROM Sales.Customers
WHERE CustomerID = @CustomerID
RETURN
GO
— E
DECLARE @CustomerRatingByCustomer INT
EXECUTE dbo.Getcustomerrating
@CustomerID = 1745,
@CustomerRating = @CustomerRatingByCustomer OUTPUT
0
0
Thanks for sharing the dumps.Referred to the drive.However question after 105 are missing. Can you please share the same if you have the copy.
0
0
P.S. part of the new 200Q 70-461 dumps are available here:
https://drive.google.com/open?id=0B-ob6L_QjGLpfnJldlZxTklTaHM0akpJUzhja2pETHJOS0owMzd4eVk1UTVNQUpvdlVxVWM
Best Regards!
0
0
Thanks Alexander,
It will be helpful for me
0
0