Forum Replies Created

Viewing 15 posts - 8,101 through 8,115 (of 10,144 total)

  • RE: GETDATE in WHERE Clause

    Thanks!

    Try this first:

    DECLARE @Today DATE = GETDATE()

    SELECT

    prd.ProductID,

    prd.Category,

    prd.ProductCode,

    prd.Description,

    prd.Price,

    ...

  • RE: GETDATE in WHERE Clause

    rburke 87921 (3/10/2010)


    Hi Lynn - thanks for that but I still get no rows returned even though there is a record with the date 2010-03-10 in the order date field....

  • RE: Today's Random Word!

    CirquedeSQLeil (3/9/2010)


    I guess that psychic helmet I bought is working correctly then. 😀

    Beedeebeedeebeedee

    I guess I spelled it wrong - is it Twiggy or Twiki?

    Aha, I think you mean this Twiki.

    "from...

  • RE: Today's Random Word!

    CirquedeSQLeil (3/9/2010)


    Twiggy

    ROFLMFAO!!!!!

    That was my knickname in school!

  • RE: Today's Random Word!

    CirquedeSQLeil (3/8/2010)


    Besides, the MCP made me do it.

    Who? Oh, the Master Control Program :blink:

  • RE: Using Start and End dates to create a number of months column

    Paul White (3/6/2010)


    Chris,

    Wherever did you get the idea to use an alias name of iTVF?

    :laugh:

    Paul

    Hey Paul, it was from a great article I was reading last week - about transgenderism...

  • RE: Using Start and End dates to create a number of months column

    Debbie Edwards (3/5/2010)


    Ooooh the first one brings bacl 12 rows and the next one brings back 9 rows.

    Im going to have a look at both of them. I need to...

  • RE: Using Start and End dates to create a number of months column

    Peter Brinkhaus (3/5/2010)


    Do you mean you have 140 almost identical query's UNIONed together? Try this one:

    Oops...sorry Peter.

  • RE: Using Start and End dates to create a number of months column

    This would do it:

    SELECT r.Registration_ID, r.[Person_ID], r.Start_Date_Registration, iTVF.MonthNum AS Duration,

    CASE WHEN iTVF.[Date Point] < ISNULL(r.[Registration End Date], GETDATE())

    THEN iTVF.[Date Point] ELSE NULL END

    FROM Test_Registrations r

    CROSS APPLY(

    SELECT MonthNum, [Date Point]...

  • RE: Are the posted questions getting worse?

    Jack Corbett (3/5/2010)


    For those not on Twitter, I passed the 70-432 Implementing and Maintaining SQL Server 2008 exam yesterday. Easier than I thought it would be. If...

  • RE: Today's Random Word!

    mbricker-600840 (3/4/2010)


    Cat atrophy.....

    What happens when you cat doesn't get enough exercise.

    Mike

    Dimensional transmogrifier. A truck - turns 3 dimensional cats into 2 dimensional ones.

  • RE: Today's Random Word!

    jcrawf02 (2/25/2010)


    CirquedeSQLeil (2/25/2010)


    crookj (2/25/2010)


    CirquedeSQLeil (2/25/2010)


    pre-planning

    As we used to say in the Military.... (6 Ps)

    P - P - P - P - P - P

    (Prior Planning Prevents Piss Poor Performance)

    Joe

    Planning -...

  • RE: Update with join - Problem with null in where clause

    Haven't you looked to see what you're updating?

    select a.comments1a, b.Subdivision

    From Notes a

    inner join CowettaCoSubs b

    on a.account_id = b.account_id

    where a.comments1 is null

  • RE: Confused with "Order by" output

    SELECT *, (SELECT COUNT(*) FROM @temp T2 WHERE T1.Phn = T2.Phn)

    FROM @temp T1

    ORDER BY (SELECT COUNT(*) FROM @temp T2 WHERE T1.Phn = T2.Phn) DESC, ID ASC

  • RE: Calculating Moving Averages with T-SQL

    Gabriel P (3/3/2010)


    Comments posted to this topic are about the item <A HREF="/articles/Moving+Average/69389/">Calculating Moving Averages with T-SQL</A>

    Excellent article, Gabriel. I reckon it's time to start messing with those pesky CTE's...

Viewing 15 posts - 8,101 through 8,115 (of 10,144 total)