Forum Replies Created

Viewing 15 posts - 58,756 through 58,770 (of 59,099 total)

  • RE: Can this be done without using cursor?

    Bull2000,

    If you use the concatenate method using the TAB character (CHAR(9) in code) instead of a comma as a delimiter, the output might just cut&paste into Excel with no other...

    --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: Date Conversion

    Cory...

    This works the way you want... leading zeros and mm/dd/yyyy format intact...

    DECLARE @Date VARCHAR(30)

    SET @Date = '2/3/2005'

    SELECT CONVERT(VARCHAR(10),CONVERT(DATETIME,@Date),101)

              

    ----------

    02/03/2005

    (1 row(s) affected)

    --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: question about shrinkdatabase

    The log file probably grew for a pretty good reason. If you shrink it and it decides to grow again, especially if the growth size is small or is 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: Stop SQL2K Rounding

    Try this, instead...

    "select boy + REPLACE(STR(age,7,4),' ','') + ' is years old'

    --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: Date column Auto Convert on INSERT

    If it truly is a "DateTime" column, it just doesn't matter what format you store it in so long as it is one recognized by SQL.  It will have...

    --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 - 58,756 through 58,770 (of 59,099 total)