Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 3,957 total)

  • RE: Exploring Recursive CTEs by Example

    DavidP-340734 (7/17/2012)


    One big caveat is the size of the datasets being used by CTEs. Be very cautions for two reasons: recursive CTE can blow up your temp db when large...

  • RE: Exploring Recursive CTEs by Example

    nem.schlecht (7/17/2012)


    Great article!

    I noticed a little mistake, though. The 2nd example under "Geometric and Arithmetic Sequences and Progressions", you have:

    "Another example: 1^1 + 1/2^2 + 1/3^3 + 1/4^4:"

    But the...

  • RE: Exploring Recursive CTEs by Example

    Wow! So many interesting responses, so little time.

    First of all, thanks to Basit, David, rodjkidb, Alex and r.mitchell for your interest and feedback. I hope that something in...

  • RE: Generating Non-uniform Random Numbers with SQL

    L' Eomot Inversรฉ (7/16/2012)


    Nice article. It's great to see some real maths in SQL.

    For most practical cases, there's a reasonable way of getting a Poisson distributed random variable; not...

  • RE: Aggregate Query question

    Well Les, I have good news. Apparently my latest ideas panned out and I've gotten the overall solution run time down to 1.5 minutes.

    Looking forward to how this stacks...

  • RE: Sql query to get recursive count

    I believe you're looking for something that handles as many levels as necessary, like this:

    Create Table #UserMast

    (

    UserID uniqueidentifier default newid(),

    EmailID varchar(100),

    ParentID uniqueidentifier,

    )

    Create Table #ProfileMast

    (

    ProfileID uniqueidentifier default...

  • RE: Sql query to get recursive count

    I agree with Chris - a very straightforward solution can be made available if:

    1. You convert your table definitions to actual, runnable DDL.

    2. Give us some sample inserts for both...

  • RE: Loop within a Loop

    Jeff Moden (7/12/2012)


    dwain.c (7/12/2012)


    Sean Lange (7/12/2012)


    SGT_squeequal (7/12/2012)


    I used the while loop within while loop worked a treat for what i need ๐Ÿ™‚

    So with 5 other methods that are faster you...

  • RE: Implementing a watchdog service for MS SQL 2008 R2 - Counting table inserts per second

    Derek - Why are you recommending to use a Windows Scheduled task?

    Seems like a SQL Server Agent job running the exact same SP would work. You can then set...

  • RE: Validation methods?

    If it wasn't difficult, then we wouldn't get paid the big bucks! ๐Ÿ˜›

  • RE: Aggregate Query question

    This script should create the NewDistricts TABLE in under 5 seconds on a machine with the same spec as the one I ran my prior timing tests on (bringing the...

  • RE: Validation methods?

    There is always a test system available:

    - Separate schema on the same database server.

    - Separate deployed front end accessible by a different URL, also on the same server.

    My take is...

  • RE: Aggregate Query question

    First check: No duplicated tuples in any solutions:

    ;WITH BaseDistricts AS (

    -- Stuff the Tuple for the Special Districts into a single string and calculate

    ...

  • RE: Find employee with overlapping shifts using cte recursive

    Jack Corbett (7/12/2012)


    Dwain,

    Essentially your query does a self-join just using a different syntax, so I'm not sure why you don't like Self-Join's. In a case like this...

  • RE: Loop within a Loop

    Sean Lange (7/12/2012)


    SGT_squeequal (7/12/2012)


    I used the while loop within while loop worked a treat for what i need ๐Ÿ™‚

    So with 5 other methods that are faster you still choose to...

Viewing 15 posts - 3,181 through 3,195 (of 3,957 total)