Create a stored procedure to take in a date param, and depending on the day, take actions...
Posted on 2008-06-25
I would like to create a stored procedure that does this:
Takes in two data parameters: Start Date and End Date
if the start date is monday, then i want to show monday's results, if it's tuesday i want to show monday and tuesday, if wednesday then m,t,w, etc till friday..... on friday i want to show the results of all five days.
i know this is possible using a datepart(dw, column) function, but 'm having a time putting the rest of it together.....