T-SQL query

  • lwe@xtra.co.nz

    Mr or Mrs. 500

    Points: 536

    Select (datepart(m,getdate())-1)*(datepart(m,getdate())-3)*(datepart(m,getdate())-5)*(datepart(m,getdate())-7)*(datepart(m,getdate())-8)

    🙂

  • hayk-736382

    SSC Rookie

    Points: 30

    Totally agree.This type of questions make look the problem from different angle.

  • Angel Sánchez R

    Valued Member

    Points: 73

    "Like" no es un operador que pertenece a los "Search Arguments"

  • steve smith-401573

    SSChampion

    Points: 10889

    And, here I am, misinterpreting the question. I read it as using EITHER would satisfy the condition of not using BOTH!

    There's always an orthogonal way to read something obvious. Personally, i think that using neither ... nor... would have been more unambiguous.

  • Shaun McGuile

    SSCarpal Tunnel

    Points: 4111

    steve smith (5/28/2008)


    And, here I am, misinterpreting the question. I read it as using EITHER would satisfy the condition of not using BOTH!

    There's always an orthogonal way to read something obvious. Personally, i think that using neither ... nor... would have been more unambiguous.

    You hit the nail on the head mate. We are all after all a rather pedantic and suposedly precise set of people - therfore abiguity needs to be eradicated with extreme predjudice, else we will interpret.

    (and the client will get precisely what they asked for not what they want).

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • leonp

    SSCommitted

    Points: 1962

    (datepart(m,dob)-1)(datepart(m,dob)-3)(datepart(m,dob)-4)(datepart(m,dob)-5)(datepart(m,dob)-7)(datepart(m,dob)-8) = 0

    should work too ....

  • Shaun McGuile

    SSCarpal Tunnel

    Points: 4111

    please dont necro old threads its not polite

    instead make a new thread and link to the old one please 🙂

    Hiding under a desk from SSIS Implemenation Work :crazy:

Viewing 7 posts - 46 through 52 (of 52 total)

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