You have a view that was created by using the following code:
You need to create an inline table-valued function named Sales.fn_OrdersByTerritory, which must meet the
following requirements:
Accept the @T integer parameter.
Use one-part names to reference columns.
Filter the query results by SalesTerritoryID.
Return the columns in the same order as the order used in OrdersByTerritoryView.
Which code segment should you use?
To answer, type the correct code in the answer area.
A.
Explanation:
CREATE FUNCTION Sales.fn_OrdersByTerritory (@T int)
RETURNS TABLE
AS
RETURN
(
SELECT OrderID,OrderDate,SalesTerrirotyID,TotalDue
FROM Sales.OrdersByTerritory
WHERE SalesTerritoryID = @T
)
Brackets are not necessary here
0
0
The ‘standard’ syntax contains brackets bcos this is an inline table-valued function. This function type has no FUNCTION BODY; instead the function-body is a SELECT statement that returns a TABLE value (not a scalar value).
0
0
CREATE FUNCTION Sales.fn_OrdersByTerritory( @T int )
Returns Table
as
Select OrderID,OrderDate,SalesTerritoryID,TotalDue
From Sales.OrdersTerritory
where SalesTerritoryID = @T
0
0
By the way, part of that new 200Q 70-461 dumps are available here:
https://drive.google.com/open?id=0B-ob6L_QjGLpfnJldlZxTklTaHM0akpJUzhja2pETHJOS0owMzd4eVk1UTVNQUpvdlVxVWM
Best Regards!
0
0