Hi I have a table Sales. Usually I will be adding to this table all data for a month. So:
CREATE Procedure AddMonth
@EnterMonth as int
AS
INSERT INTO X
SELECT FROM Y
WHERE Y.Month = @Month
Now sometimes I just want to only add Sales for a certain product. So two questions:
- Should I use a new stored procedure for sales by product and month? Thinking with regards to speed.
- Or, use an optional parameter of the Product. If such a thing is possible, of course.
Thanks