Forum Replies Created

Viewing 15 posts - 56,731 through 56,745 (of 59,067 total)

  • RE: Grouping by min/max in a series

    Peter, not sure what your's would do if you added a primary key to the table but it currently take about 15 seconds to do 4,000 rows, 60 seconds to...

  • RE: Grouping by min/max in a series

     

    As some have suggested, both methods get pretty slow, even in the presence of proper indexing, simply because of the triangular joins involved. As is typical of large triangular joins,...

  • RE: Forums - one table or seperate tables?

    Yep... I have to agree... single table would be the way to go... makes for "common code" which makes life simple and you don't have to use dynamic SQL or...

  • RE: Median Calculations

    I think that once you read my "long" post with the sample code, you'll find that 10 reps on a single job will be the way to go...

  • RE: TEmp DB is becoming huge

    As some have suggested, step 1 would be to ensure the Recovery Mode on TempDB is set to SIMPLE.

    Step 2 would be to rewrite your code so it doesn't use...

  • RE: Median Calculations

    Oki-doki... change of plans... decided to go full-bore on this one (Man! This one was FUN! ).  First, if you had SQL...

  • RE: Median Calculations

    I was doing some checks on your formulas... because of the integer math you are using everywhere, you're coming up with the Statistical Median when you have an even number...

  • RE: how to split select result to dynamic field

    The "Pivot option" you speak of is not available in SQL Server 2000... and this IS an SQL Server 7/2000 forum.

  • RE: Median Calculations

    I would solve each of the 4 separately... the ol' "peel one potatoe at a time" usually works the best on these types of things but, of course, that's your...

  • RE: Sql Triggers

    Richard,

    Michael is correct... the most efficient way is to simply make sure that GETDATE() is used in the procs that update the table.  As you point out, that does not...

  • RE: Sql Triggers

    No... it only get's updated on INSERT... like any default, it WILL NOT BE APPLIED DURING UPDATES... for example...

    USE TEMP

    CREATE TABLE ModifyTest(SomeCol INT, ModifiedDate DATETIME)

    GO

    CREATE...

  • RE: Median Calculations

    First, I think the use of global (##) temp tables, as you have, will eventually burn you with a "table already exists" error.  Recommend you change them to local (#) temp...

  • RE: how to split select result to dynamic field

    There are about a thousand posts about this on this forum.  Please do a search on "crosstab" and "pivot".

  • RE: Changing column order in Table

    Ah... got it, David... thought you were talking about something else.

  • RE: Changing column order in Table

    quoteBTW, the order of columns defined in create table statement has no impact on the way the data...

Viewing 15 posts - 56,731 through 56,745 (of 59,067 total)