Forum Replies Created

Viewing 15 posts - 37,936 through 37,950 (of 59,072 total)

  • RE: Tuning

    mike 57299 (6/23/2010)


    Hi All:

    I am trying to use the Database Tuning Advisor on a set of statements. The set goes something like this:

    SELECT order_hdr_id, customer_id, order_date, amount, city, state,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Rename Temporary Table Name?

    I don't believe so. Not in any forthright manner, anyway. Perhaps if you explained why you need to do such a thing, we could suggest an alternative.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Help needed

    There's nothing there to guarantee the order of the rows and that's one of the many reasons why Lutz requested that you post the data according to the article he...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: SQL Database development Questions

    steven.k.berry (6/22/2010)


    Hi all,

    I come up with the below which does the job, however I was just wondering if there is a better\alternate way to approach this issue. Your thoughts are...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Make a 100+ Server Inventory in 30 minutes

    Stanley Chan (6/23/2010)


    Jeff Moden (6/22/2010)


    stephen.burke (6/14/2010)


    MAPS from Microsoft is the best way to record all such info in a database for you, plus a ncie report and excel spreadsheet.

    In order...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Make a 100+ Server Inventory in 30 minutes

    stephen.burke (6/14/2010)


    MAPS from Microsoft is the best way to record all such info in a database for you, plus a ncie report and excel spreadsheet.

    In order to produce the inventory...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Records per hour within a time span

    daveb-840383 (6/22/2010)


    OK... I tried out Eugenes code on a much bigger data set. It appears to be aggregating hourly.

    What I'm trying to do is get a total hourly count, not...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Cursors Be Gone!

    YSLGuru (6/21/2010)


    Wow Tom, you really need to whip up on this guy bad ey?

    It my be just me but it doesn't look that way to me. Gaby cited some...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Records per hour within a time span

    Eugene Elutin (6/19/2010)


    Jeff, in a final code I would use temp table (like in the first sample). But in this case I did it with CTE to save few lines...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Records per hour within a time span

    Ya know... after I got done tweaking my code, except for the way we gen the dates, the code came out nearly identical as your latest tweek. I'll also...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Records per hour within a time span

    Eugene Elutin (6/19/2010)


    Your query does proper check and returns the count of records for each hour between given dates in StartDate and NextStartDate, however if you add time part (eg....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Are the posted questions getting worse?

    Greg Edwards-268690 (6/18/2010)


    WayneS (6/18/2010)


    Just my luck.....

    Wednesday, I updated a test box to SQL 2008. Pretty old (> 9 years)...

    Last night, the drive controller failed spectacularly (sparks, smoke, everything), completely corrupting...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Formatting and Readability

    Nadrek (6/18/2010)


    Different styles are different styles, neither good nor bad:

    SELECT a.c1

    ,a.c2

    ,b.c1

    FROM db.schema.tbla a

    INNER JOIN db.schema.tbla b

    ON b.col1 = a.col1

    AND a.col2 = b.col2

    Heh... well, except for maybe that leading...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Records per hour within a time span

    Scott is correct. The code I posted has no checks for whole days nor even whole hours.

    If your code is passing the start date as a legal...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Simple query for the Months of a year

    WayneS (6/18/2010)


    Dan.Humphries (6/18/2010)


    Actually before I read your article I must admit I gave very little thought to set based programming at all.

    Now, this here is a man that isn't afraid...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 37,936 through 37,950 (of 59,072 total)