Forum Replies Created

Viewing 15 posts - 38,611 through 38,625 (of 59,072 total)

  • RE: Missing numbers in a series

    Paul White NZ (5/4/2010)


    Hey, would anyone like to see the SQLCLR solution to this same problem? 😉

    Absolutely. You know me... I never turn down knowledge. Thanks, Paul.

    --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: Missing numbers in a series

    rajesh.subramanian (5/4/2010)


    Yes jeff you are right. Just started to use this forum... I have just posted what I have tried first when I read that.

    I know even in our...

    --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: Optimization: DE-Delimiting a Semi Colon Delimited List

    Paul White NZ (5/3/2010)


    Jeff Moden (5/3/2010)


    Paul White NZ (5/3/2010)


    Nine times out of ten a SQLCLR solution is faster than the Tally table and uses fewer resources:

    ... for string splits.

    Yes 🙂

    There...

    --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 update a table from another table in differents db

    willian.funes (5/3/2010)


    Thanks Jeff,

    Both database are in the same server because they are using the same system but for different little companies in a corporation, so when users add a new...

    --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: Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

    fhljudyfong (5/4/2010)


    I have a problem with the cross-tab. My records in the table are the in out records of each staff. Here are sample data:

    Staff IDDate Time

    426/04/201009:36:00

    426/04/201013:11:00

    426/04/201014:49:00

    426/04/201017:59:00

    427/04/201009:37:00

    427/04/201013:18:00

    427/04/201014:22:00

    427/04/201018:08:00

    428/04/201009:40:00

    428/04/201013:03:00

    428/04/201014:47:00

    428/04/201018:38:00

    429/04/201009:36:00

    429/04/201013:04:00

    429/04/201013:58:00

    429/04/201018:37:00

    526/04/201008:47:00

    526/04/201013:05:00

    526/04/201013:38:00

    526/04/201017:50:00

    527/04/201008:53:00

    527/04/201013:01:00

    527/04/201013:36:00

    527/04/201017:50:00

    528/04/201008:57:00

    528/04/201013:02:00

    528/04/201013:03:00

    528/04/201013:30:00

    528/04/201017:46:00

    529/04/201009:09:00

    529/04/201013:03:00

    529/04/201014:29:00

    529/04/201018:02:00

    529/04/201018:03:00

    Would like...

    --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: Missing numbers in a series

    rajesh.subramanian (5/4/2010)


    DECLARE @Numbers TABLE (N INT)

    DECLARE @MissingNumbers TABLE (N INT)

    Declare @vMax int

    Declare @vMIn int

    INSERT INTO @Numbers

    VALUES (50000001),(50000002),(50000019),(51000000)

    --VALUES (1),(2),(19),(20)

    Set @vMax = (Select MAX(N) from @Numbers)

    Set @vMin = (Select MIN(N) from @Numbers)

    while(@vMax...

    --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: Minimising use of tempDB during large INSERT

    Drammy (5/4/2010)


    I was only querying about tempDB

    I don't see a lot in your query that would cause any huge TempDB problems unless most of the tables number in the millions...

    --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: Optimization: DE-Delimiting a Semi Colon Delimited List

    Paul White NZ (5/3/2010)


    Nine times out of ten a SQLCLR solution is faster than the Tally table and uses fewer resources:

    ... for string splits.

    --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: Missing numbers in a series

    Ok... here's a test table with some huge gaps over a huge range of numbers along with some single row gaps. The code takes about 12 seconds to run...

    --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 long to build index

    SQLJocky (5/3/2010)


    Is there anything that can tell me how long it might lock down my table if I add a new index? We are running 2005 Standard so 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: How to avoid this dead lock?

    It tells you what the database ID is and it tells you the proc IDs AND it tells you the code snippets for the deadlock participants... next step is 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: combine two subjects of same field type on one row

    reg 18234 (5/3/2010)


    ColdCoffee (5/3/2010)


    Quite possible, buddy.. but you will have to tell us atleast the description of the house; we ourselves will find out the address and the fastest way...

    --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: Missing numbers in a series

    Folks, I think that just about anything with any form of a Tally table is the wrong way to do it here especially if you have very large gaps 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: Missing numbers in a series

    gurukiran.bhat (5/3/2010)


    following method worked out for me

    for this example i have used table called table1 which has single column column1.

    create table table1

    (column1 int)

    I have inserted values...

    --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: Hiding payroll data from admin

    Heh... some VERY interesting thoughts on this thread... particularly the idea of having a 3rd party doing the administration. I'v been through that several times. My question would...

    --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 - 38,611 through 38,625 (of 59,072 total)