Forum Replies Created

Viewing 15 posts - 3,256 through 3,270 (of 3,957 total)

  • RE: Generating Non-uniform Random Numbers with SQL

    GPO (7/2/2012)


    A stunning contribution to the discussion Dwain. The SQL Server world just got a little better.

    Thanks GPO, for the kudos and the inspiration! The article was fun to...

  • RE: Using CASE to create SQL Statement

    Sean Lange (7/2/2012)


    You will find far better performance and code maintenance by creating a sproc for each of your different select statements. The code dwain posted is indeed quite a...

  • RE: Aggregate Query question

    Hey Les! Just wanted you to know that I haven't forgotten about you and Sweden.

    Here's a progress report. I have a single, cascading CTE that generates the following:

    1....

  • RE: Find delta in the same table

    Your welcome. That's actually the first time I've had a chance to try a correlated subquery inside a CROSS APPLY!

  • RE: Find delta in the same table

    Since valuation date has changed on the B record for counterparty, I don't see how you can consider it to be part of the same group on deal ID, contract...

  • RE: Aggregate Query question

    Sorry but I do know why the CTE returns 0 rows. You must still have the population equality check on the last line. Try taking that out.

    You'll find...

  • RE: Aggregate Query question

    Les Cardwell (6/29/2012)


    This is a great CTE study for me...

    BTW, I ran it against this server, and it ran in 7min...however, no rows were returned.

    Singles - you can limit this...

  • RE: Availability calculation - a nice T-SQL problem

    Jeff Moden (6/28/2012)


    Not just the CROSS APPLYs but the fact that the 2nd CA refers to the 1st. Until ChrisM showed me, I haven't even tried that wonderful trick....

  • RE: Aggregate Query question

    Les,

    I'll need to go over your posts carefully to thoroughly understand but I think what you're saying I can grok.

    Last night when I was working on this, I realized that...

  • RE: Availability calculation - a nice T-SQL problem

    Jeff,

    First of all, thanks for not laughing. 🙂

    Clearly you've made a wonderful improvement to the speed. And I do recognize the trick (CROSS APPLYs right?). I've been meaning...

  • RE: Aggregate Query question

    I think this SQL is the correct algorithm, however I have not been able to arrive at a way yet to prune the resultset of unwanted results to pass to...

  • RE: Availability calculation - a nice T-SQL problem

    Jeff Moden (6/28/2012)


    dwain.c (6/27/2012)


    I like this problem and wanted to contribute.

    Let other people in on the fun. 🙂 What does dbo.GenerateCalendar() look like?

    Please don't laugh! This was a...

  • RE: Aggregate Query question

    Hello again Les!

    Since I couldn't stop thinking about this today, I decided to learn what I could so as to ask you my questions prior to the weekend. To...

  • RE: Aggregate Query question

    Les,

    I did take a quick 15 minute look. It appears you didn't implement Chris's speed improvement suggestions. However I doubt that will be sufficient for the size of...

  • RE: Using CASE to create SQL Statement

    Finally? I didn't realize I was on a deadline...:w00t:

Viewing 15 posts - 3,256 through 3,270 (of 3,957 total)