• mbrady5 (2/8/2016)


    Hello,

    Every morning between 6 AM and 7 AM, there is a shift manager that needs to run a report and comment on the performance of their shift.

    Their shift runs from 6PM on the prior day to 6AM the current day. This is considered Shift 1

    The other shift runs (for reporting purposes) from 6AM the current Day to 6PM the current day. This is considered Shift 2.

    I have a Datetime field that I want to parameterize so the end user can interact and pick the shift.

    Can anyone think of a way to do this that is easy for the end user?

    Thanks

    Pretty sparse on the details but maybe it is as simple as two values for the user to choose. Shift and StartDate. Then in your query you just adjust the date using some math based on the values received.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/