Forum Replies Created

Viewing 15 posts - 33,331 through 33,345 (of 59,099 total)

  • RE: How to eliminate all NULL columns...

    thundersplash845 (7/7/2011)


    Jeff, Only name column will not hold any NULL value....date may have...

    Thanks!!

    Then there's a possibility that this could be done rather "auto-magically" using dynamic SQL. Does the name...

    --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 Grouping Data

    ringovski (7/7/2011)


    Jeff Moden (7/7/2011)


    ringovski (7/6/2011)


    Not sure you mean by DDL & DML, but here are the table specs.

    Take a look at the first link in my signature line below... it'll...

    --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: Handle NULLs

    For what it's worth, here's my rendition of how this problem might be solved. It doesn't preserve dupes and it sorts the HobbyNames on each row alphabetically. As...

    --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: Handle NULLs

    I decided to build a large amount of test data that more closely matches the OP's given conditions. I'll be back with a possible solution soon. Not to...

    --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: Sorting One Item first, then the rest

    I agree with Seth with some minor changes.

    1. Use UNION ALL... the code will be faster because it doesn't do an implicit DISTINCT like UNION would.

    2. Second, you'll...

    --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: How to eliminate all NULL columns...

    thundersplash845 (7/7/2011)


    If you take the below example,

    row 1 - fax column is null ,row 2&5 - e-mail and row 4 -mbl.

    Here i want to eliminate all these rows...

    --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: XP_cmdshell DIR

    ken_wenze (7/7/2011)


    Yes - I can use the cmdshell but C:\ in that command would be the servers C:...the directory i need to gather from is on my local desktop.

    Not a...

    --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: Would you change to a better job for a lot less money?

    Craig Farrell (7/6/2011)


    I have learned a very simple lesson along the way...

    ... anytime I dread going to a specific job (not work in general, that's an unavoidable annoyance) consistently, I...

    --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: Rebuild Index Hangs

    jasonwi1202 (7/6/2011)


    Isn't the MAXDOP option reliant on the number of processors that the server has? Does your test server have only 1 processor?

    Yes and no. MAXDOP will not magically...

    --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: Difference between clustered and non clustered index..

    Jayanth_Kurup (7/7/2011)


    A very crude answer to your question would be

    Clustered index work better on tables which have a column that can be used to uniquely identify each row.

    Non Clustered...

    --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 Grouping Data

    ringovski (7/6/2011)


    Not sure you mean by DDL & DML, but here are the table specs.

    Take a look at the first link in my signature line below... it'll help you get...

    --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?

    ALZDBA (7/3/2011)


    It's great to see many of SSC addicts have been granted MVP once more.

    Congratulations to you all.

    Dang... I missed this one on the first pass. Thank you, Sir....

    --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?

    David Burrows (7/6/2011)


    Jeff Moden (7/5/2011)


    This turned into a "watercooler" thread a long time ago and anyone with a minor dose of manners and a sense of humor is invited.

    Damn! Counts...

    --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?

    opc.three (7/6/2011)


    I have thanked you many times before in these forums and it goes without saying that there were no doubts as to your deservedness but I must say it...

    --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: XP_cmdshell DIR

    ken_wenze (7/6/2011)


    Jeff - This looks pretty good but how would i modify this to loop through every sub directory in a folder such as C:\MyFolder

    Hi Ken,

    Are you allowed to use...

    --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 - 33,331 through 33,345 (of 59,099 total)