QuestionQ7
Secure, optimize, and deploy database solutionsYou have an Azure SQL database containing a table named dbo.Orders. dbo.Orders has a CreateDate column that stores order-creation dates.
You need to create a stored procedure that filters Orders by CreateDate for one calendar day. The solution must be SARGable.
How should you complete the Transact-SQL code? Each value may be used once, more than once, or not at all.
Drag & Drop
CREATE PROCEDURE dbo.usp_SearchOrders @StartDate date AS BEGIN SET NOCOUNT ON; DECLARE @EndDate date; SET @EndDate = SELECT o.CreateDate, o.OrderId, o.ShipDate FROM dbo.Orders AS o WHERE o.CreateDate >= AND o.CreateDate < ; END; GO
Community Discussion