Forum Replies Created

Viewing 15 posts - 44,011 through 44,025 (of 59,101 total)

  • RE: Detect duplicate rows - with a twist

    Scott Roberts (4/29/2009)


    Sorry about the confusion over mis-matched data sizes for RawData. The RawData column used to be VARCHAR(300) but we encountered a new format that is longer than 300...

    --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 Function : Find ‘X’ Business Days in the Future

    Bob Hovious (4/29/2009)


    But, the same function that works acceptably for doing something one time may crawl if repeated a hundred thousand times. The issue Jeff raised is not whether...

    --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: Perform math on string

    hayzer (4/29/2009)


    So far this is just the second best solution around....

    Never allow such garbage in the DATABASE.. 😀

    Prevention is better than cure...

    Heh... a kindred spirit. I wish more people...

    --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: Perform math on string

    GSquared (4/29/2009)


    Absolutely, but that doesn't actually help the person with the original question, who was handed a database that already had this in it.

    Actually, it does... the person now knows...

    --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: Perform math on string

    Jan Van der Eecken (4/29/2009)


    Jeff Moden (4/28/2009)


    Sergiy (4/28/2009)


    Jeff Moden (4/27/2009)


    I don't allow such garbage into my db's to begin with. 😛

    I believe this is the method that doesn't suck so...

    --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 Function : Find ‘X’ Business Days in the Future

    michaelberry67 (4/29/2009)


    I think you all my benefit from my function that was published by SQL server magazine:

    http://www.sqlmag.com/Articles/ArticleID/97590/97590.html?Ad=1

    Do you have any performance stats... say, on 100,000 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: Perform math on string

    Sergiy (4/28/2009)


    Jeff Moden (4/27/2009)


    I don't allow such garbage into my db's to begin with. 😛

    I believe this is the method that doesn't suck so much.

    :hehe:

    Heh... I just knew you were...

    --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: Comparison of Dates in SQL

    craig.lovegren (4/28/2009)


    Jeff Moden (4/28/2009)


    Percent of what? Percent of BATCH??? That absolutely cannot be trusted. Only actual cpu usage, duration, reads, and writes should be used to measure...

    --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: Comparison of Dates in SQL

    craig.lovegren (4/28/2009)


    guess we could always just run both methods over a largish table and get stats out of the query analyser (like cpu usage, etc)

    I did exactly that, using 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: How to split one mdf file into two

    Mohan Kumar (4/27/2009)


    backup database [dbaScripts] to disk=N'C:\backup\dbaScripts_1.bak',

    disk=N'd:\backup\dbaScripts_2.bak' with stats=10;

    Rgds

    Mohan Kumar VS

    Heh... 10 is the default. Why bother typing 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: Perform math on string

    Sergiy (4/27/2009)


    Jeff Moden (4/27/2009)


    GSquared (4/27/2009)


    To deal with times that don't have enough leading zeroes, you can either padd the string, or you can reverse it. Either one works.

    As 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: Select Values from multiple Rows Into a Single Row

    John,

    Do the numbers have to be in separate columns, or just on the same line?

    Also, why do you need to do this type of denormalization? Where is the output...

    --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: Getting the Results witout using SubQuery

    ningaraju.n (4/27/2009)


    If u use the Sub query its killing the Performance.. So..;-)

    Not always true if the subqueries only use "=". Anyway, looks like Chris get's the hat-trick on this...

    --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: Column,Date,Update

    karthikeyan (4/27/2009)


    i have to get the monthend date between @year_st and @year_end - current month (i.e previous month last date)

    i.e

    31/jan/2009

    28/feb/2009

    31/mar/2009

    I am trying to implement 'Tally' table logic.

    I'll do 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: How to split one mdf file into two

    Ratheesh.K.Nair (4/27/2009)


    You can divide the backup into different files(striped backup) like if u have a 2GB DB,take backup to two file like

    backup database DB_name to disk='path.file1',

    ...

    --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 - 44,011 through 44,025 (of 59,101 total)