Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    8

    Unanswered: select query birthday between 11/31 to 12/1 every year, how?

    select query birthday between 11/31 to 12/1 every year, how?

    Regards,
    Joon Ping.

  2. #2
    Join Date
    Oct 2003
    Location
    Dallas
    Posts
    76

    please give more info

    you will actually have to give a better description of what you want.

    If you are simply just trying to select those days of the month for every year then we can simply use a date function, but first let me know if that is what you are after.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    select *
    from YourTable
    where right(convert(varchar(10), [Birhtday], 120), 5) between '11-31' and '12-01'

    Note that this does NOT work if the date range spans January 1st.

    blindman

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    that's a weird range, very short, eh? and i don't see how it could possibly span january 1

    in fact, it's only two days, you could even say

    where convert(char(5),birthday,1) in ('11/31','12/01')





    rudy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •