Convert month to date and add value in datewise from Month column

  • Hi All

    This is great article and discussed with my manager and they want to have what you suggested. Then i created excel sheet for how we want to have the date s. S i herewith attached the excel format . Afterthat we i need to run the query against attendance data.

    Please guide me .Thanks.Ram

  • I took a look at your spreadsheet, and I see all kinds of columns for data that's easily computed. It also seems that every time someone has a fairly complete query, that there's really considerably more stuff behind the scenes that suddenly comes into play. If you want a good solution, you really need to identify the exact source data, and the ultimate desired solution, right from the beginning.

    With 13 years of data, it may make sense to either create a holidays table that includes scheduled days where class isn't being held as well as the actual holidays themselves, and modify the part of the query that uses NOT IN to contain a SELECT against the date field in that new holidays table instead of just a list of dates; or to encapsulate the list of dates in a user-defined function that returns a boolean value of true if the date is on the list or false if not, and to change the NOT IN part of the query to instead say NOT dbo.hdayfunction([DATE]).

    I'm not sure what else you're trying to accomplish, so without those details, it's rather difficult to know what to offer up.

    EDIT: If you're spreadsheet was intended to be a holiday table, it only needs one field - to contain the date of any given holiday or day off. If it's intended to be your calendar table, then with only 13 years of data, I'm not sure it's necessary unless peformance is a genuine disaster without it.

    Steve

    (aka smunson)

    :):):)

    ramaanujamr (6/10/2008)


    Hi All

    This is great article and discussed with my manager and they want to have what you suggested. Then i created excel sheet for how we want to have the date s. S i herewith attached the excel format . Afterthat we i need to run the query against attendance data.

    Please guide me .Thanks.Ram

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply