Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 1,228 total)

  • RE: Calculating Moving Averages with T-SQL

    Gabriel P (3/13/2010)


    Chris -

    That's very nice work. I ran it on the code I used in the article, and modified all the decimal variables/fields to (8,2) and it provided just...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Calculating Moving Averages with T-SQL

    I wonder...

    Make some data:

    DROP TABLE #Temp

    SELECT TOP 1000000

    RowID = IDENTITY(int, 1, 1),

    Avg20day = CAST(NULL AS DECIMAL(16,6))

    INTO #Temp

    FROM master.dbo.syscolumns a, master.dbo.syscolumns b

    CREATE UNIQUE CLUSTERED INDEX RowID ON #Temp (RowID)

    --...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (3/11/2010)


    ChrisM@home (3/11/2010)


    CirquedeSQLeil (3/11/2010)


    Off to the desert I go (or should it be dessert 😉 ). Lynn is the tent available?

    To paraphrase Nicole Kidman..."I get to sleep with a...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (3/11/2010)


    Off to the desert I go (or should it be dessert 😉 ). Lynn is the tent available?

    To paraphrase Nicole Kidman..."I get to sleep with a hippo"


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    Jeff Moden (3/10/2010)


    ...master of the high velocity pork chop. 😛

    20,022 posts 5 minutes ago. Here's a BIG friggin' beer to the old git who taught me most of what...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    GSquared (3/11/2010)


    CirquedeSQLeil (3/11/2010)


    GSquared (3/11/2010)


    As promised a couple of months ago, I've updated to having a beard in my pic. 🙂

    Holy Crap - who is that?

    That's me with 2 months...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Need help parsing a string in a T-SQL query.

    Timothy

    If your version really is SS2K8 then you should have a quick peek in BOL at text datatype to get a good idea of why you should change your column...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Please help me understand the difference between these two statements

    Blimey! I was going to suggest it was because in query 1, the workorder table isn't in the FROM list, so the WHERE clause wouldn't work, leading to an unrestricted...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    GilaMonster (3/8/2010)


    ChrisM@home (3/8/2010)


    You have an echo, Gail. I nearly wasted a mouthful of beer reading the OP's reply to your post.

    Look at the times of the posts. I was editing...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    GilaMonster (3/8/2010)


    And the vague question of the week award goes to

    ....

    ...

    <drum roll>

    ...

    ....

    http://www.sqlservercentral.com/Forums/Topic878772-1292-1.aspx

    You have an echo, Gail. I nearly wasted a mouthful of beer reading the OP's reply to your post.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Complex T-SQL query

    No problem...

    ;WITH OrderedSource AS (

    SELECT ExecSeq = ROW_NUMBER() OVER (ORDER BY ID, EntryDate),

    RowOfID = ROW_NUMBER() OVER (PARTITION BY ID ORDER BY ID, EntryDate),

    RowsPerID = COUNT(ID) OVER(PARTITION BY ID),...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Alternate of Row_Number() in SQL 2000

    Jeff Moden (3/7/2010)


    Heh... probably not enough coffee on my part, yet, but I'm missing it, Chris. How can you use the code you posted to produce the ID_Line_No column...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Complex T-SQL query

    lmu92 (3/7/2010)


    ChrisM@home (3/7/2010)


    ...

    You've posted a third method for resolving this job, late on a saturday night after a few beers because you had a spare 5 minutes. Puts it...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Alternate of Row_Number() in SQL 2000

    Lowell (1/27/2010)


    to do the equivilent of row-number() in 2000, I've always had to create a temp table with an extra column, insert the data into the table, then run an...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Complex T-SQL query

    lmu92 (3/6/2010)


    @chris-2: You're using a CTE? How comes?

    I've been studying your solutions mate - finally saw the light 😛

    You've posted a third method for resolving this job, late on a...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

Viewing 15 posts - 1,096 through 1,110 (of 1,228 total)