Forum Replies Created

Viewing 15 posts - 34,546 through 34,560 (of 59,099 total)

  • RE: Are there tools to capture query cost in dev and test environment?

    The supposed cost of a query frequently has nothing to do with its actual performance. Your best bet is to setup SQL Profiler to monitor the real use of...

    --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: Pivot/cross tab question

    wmedernach (3/20/2011)


    I apologize Jeff, I thought you were asking 'michaelAdrianJohnson' how many names he had... 😉

    In the 'real data' I have _many_ names in this table, and the timestamps aren't...

    --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: Pivot/cross tab question

    wmedernach (3/20/2011)


    Thanks michaelAdrianJohnson for the information.

    Warren M

    Again I ask... how many names do you have in your real table and will the number of names ever increase? If the...

    --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: Insert random numbers into a column

    Craig Farrell (3/20/2011)


    but it's still just an identity() column in an odd order.

    I absolutely agree except for one thing... my solution isn't self-maintaining. An IDENTITY column is and, therefor,...

    --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: Insert random numbers into a column

    bitbucket-25253 (3/20/2011)


    Craig Farrell (3/20/2011)


    This seems exactly like why Identity() was built. It's random in that it has nothing to do with the rest of the data, and is unique...

    --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: Insert random numbers into a column

    henryvuong1000 (3/20/2011)


    I have a table, one of the columns is empty. I want to insert a random number into each row of the empty column, under the condition that no...

    --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: Pivot/cross tab question

    wmedernach (3/19/2011)


    Hello all,

    I'm looking for suggestions on how to create a query to structure some time series data.

    The data looks something like this:

    Is this possible with the Pivot command?

    Thanks for...

    --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: Searching Functions, Procedures and Tables

    FredS-1001785 (3/18/2011)


    No, I am searching for the one character long string '#'

    What do you want to do when you find the character more than once? Are you simply looking...

    --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: efficiency of query approaches

    johnsql-193053 (3/20/2011)


    GilaMonster (3/20/2011)


    What does your testing show? Have you looked at the execution plans, duration and IO statistics of each?

    The 4 queries return the same result like:

    SKUGroupIDSKUMain

    S20003120003S200031

    M20003220003S200031

    T20003320003S200031

    A10092110092A100921

    B10092210092A100921

    G30005130005G300051

    You asked which is...

    --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: Query help for Week wise report of a given month and year

    joshtheflame (3/19/2011)


    Actually I am developing a application in ASP.NET where datasets for reporting doesnt populate through dynamic query which has EXEC(@SQL) statement and tmp tables. it requires a pure select...

    --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: REPLACE Multiple Spaces with One

    a.rajmane (3/19/2011)


    Nice and useful script.

    The same approach is used to find number-of-string-occurrences-with-in-a-string

    look at here.

    Thanks for the feedback and the link.

    In reference to that link for finding the...

    --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: Group by

    But that's no reason to not use a function for something not included or even contrary to established documentation especially if it greatly simplifies the resolution to a problem or...

    --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 Query taking long time

    Best_boy26 (3/19/2011)


    Hi Experts,

    I have a SQL Table.

    And I have written againest of it lot of math Calculations and for each calculations I created views and finally I joined all...

    --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: Storing HTML into a XML-field

    I can't help here but I have to ask... why would anyone store either XML or HTML in a database?

    --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: REPLACE Multiple Spaces with One

    jcrawf02 (3/18/2011)


    Daniel Bowlin (3/18/2011)


    I have a database filled with extra spaces and I have been using this nested replace method for sometime now. However I have always been concerned...

    --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 - 34,546 through 34,560 (of 59,099 total)