DateFunction

  • Write a query based on Customer table that returns list of customers having same birthday. List all

    groups.

  • kaladharreddy15 (3/9/2010)


    Write a query based on Customer table that returns list of customers having same birthday. List all

    groups.

    And what have you done so far to solve this particular problem? I believe that this problem can be solved in SQL Server 2005 using a CTE and the DENSE_RANK windowing function.

    Look them up in Books Online and see what you can come up with.

  • kaladharreddy15 (3/9/2010)


    Write a query based on Customer table that returns list of customers having same birthday. List all

    groups.

    Heh... this is a simple query and it sounds a whole lot like a homework problem. Please show us what you've tried. You also might want to tell us what a "group" is in this case.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • kaladharreddy15 (3/9/2010)


    Write a query based on Customer table that returns list of customers having same birthday. List all

    groups.

    I can't - my Customer table doesn't include birthday information.

  • Paul White (3/11/2010)


    kaladharreddy15 (3/9/2010)


    Write a query based on Customer table that returns list of customers having same birthday. List all

    groups.

    I can't - my Customer table doesn't include birthday information.

    ...but, how do you know when to send them gift baskets? 😛

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • jcrawf02 (3/12/2010)


    ...but, how do you know when to send them gift baskets? 😛

    They all get NULLs on their birthdays 😛

Viewing 6 posts - 1 through 5 (of 5 total)

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