General - Do you know every object name should be owned by dbo?
Updated by Brook Jeynes [SSW] 2 years ago. See history
123
No component provided for introEmbed
CREATE PROCEDURE [Adam Cogan].[Sales by Year]@Beginning_Date DateTime,@Ending_Date DateTime ASSELECT Orders.ShippedDate,Orders.OrderID,"vwOrderSubTotals".Subtotal,DATENAME(yy,ShippedDate) AS YearFROM OrdersINNER JOIN "vwOrderSubTotals"ON Orders.OrderID = "vwOrderSubTotals".OrderIDWHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
❌ Figure: Figure: Bad Example
CREATE PROCEDURE [dbo].[Sales by Year]@Beginning_Date DateTime,@Ending_Date DateTime ASSELECT Orders.ShippedDate,Orders.OrderID,"vwOrderSubTotals".Subtotal,DATENAME(yy,ShippedDate) AS YearFROM OrdersINNER JOIN "vwOrderSubTotals"ON Orders.OrderID = "vwOrderSubTotals".OrderIDWHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
✅ Figure: Figure: Good Example
Related rules
Need help?
SSW Consulting has over 30 years of experience developing awesome software solutions.