Forum Replies Created

Viewing 15 posts - 451 through 465 (of 8,416 total)

  • RE: What motivates those of you who answer questions?

    Greed. Steve pays me $50 per post.

  • RE: Generating n-Tuples with SQL

    ChrisM@Work (5/31/2012)


    I wouldn't know, haven't had much opportunity to lurk here or elsewhere recently - but here are two alternatives which are measurably faster if you run them enough times:

    Thanks,...

  • RE: Clustered Indexes

    ScottPletcher (5/31/2012)


    Interesting. I used a start-up proc to set the flag, so it was almost immediately on.

    Ok that cuts the scope a bit. I wonder how many allocations...

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    I hope my description of that record to Lynn will clarify things a bit.

    Aha, ok this is an easy tweak - we just need to traverse the records...

  • RE: Clustered Indexes

    ScottPletcher (5/31/2012)


    DBCC TRACEON

    Ah well that might explain some of what you saw then. Using it as a start-up flag might give you more complete coverage.

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    I'll have to completely break down you code to see if I can re-create it before I fully understand it. Like Dwain said, I'm very recursively challenged.

    Have...

  • RE: Figuring out NSF payments

    Set-based iteration solution:

    -- Important index

    CREATE UNIQUE INDEX

    [UQ dbo.PAYMENTS ID_CASH_TRAN, ACCT_NUM, TS_PMT (AT_PMT, CD_PMT_SRC)]

    ON dbo.PAYMENTS

    (ID_CASH_TRAN, ACCT_NUM, TS_PMT)

    INCLUDE (AT_PMT, CD_PMT_SRC);

    GO

    -- Set-based iteration holding...

  • RE: Figuring out NSF payments

    Lynn Pettis (5/31/2012)


    It happens to be the one that Paul found with his solution.

    Yes I highlighted that difference in my first post. I wonder if Greg missed it.

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    I don't get it Paul. I took 10 of the accounts that had records in my result set and not yours, and ran both of our code...

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    Thank you Paul. I was actually in the process of letting you know what a dunce I am for not trying that first. DOH!

    Not at all,...

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    I am trying to get the timestamp of the NSF included in your output, but I keep messing it up 🙂

    I omitted that column from the final SELECT...

  • RE: Transactions 3

    Hugo Kornelis (5/31/2012)


    And here is yet another variation, (using an option that I would not mind being removed from the product)

    Ah, IGNORE_DUP_KEY, a rich vein for QotD questions 🙂

    CREATE TABLE...

  • RE: Transactions 3

    John Mitchell-245523 (5/31/2012)


    Wow! Took a while to get my head round that, but when I did, it made sense. An INSERT statement has to succeed or fail as...

  • RE: Transactions 3

    I understand this behaviour, really I do, but it will never be fully intuitive; especially since SQL Server has such bizarre rules concerning which errors do what (terminate the statement,...

  • RE: Update Recursively

    Assuming the changes to be made are in a table...(with the same sample data as before)

    -- Table to hold set of changes

    DECLARE @Updates AS TABLE

    (

    id_task ...

Viewing 15 posts - 451 through 465 (of 8,416 total)