Forum Replies Created

Viewing 15 posts - 1 through 15 (of 229 total)

  • RE: CTE to determine Course Level

    I found this example very useful.

    I do have a question regarding the efficiency of using recursion. Even though is get rids of explicit loops, does it result in...

  • RE: Complex Windowed Sum - New Requirement

    The sum of quantities encompasses all the UnitNo's of a customer in one single Total Qty for each customer, not separate sums for each individual UnitNo.

    I would expect the...

  • RE: Complex Windowed Sum - New Requirement

    The CustomerTotal is the "to-date" value, i.e. the current sum of all quantities in all units up till the current transaction.

    If an existing customer acquires a second UnitNo,...

  • RE: Complex Windowed Sum

    Finally out that meeting.

    Works like a cham.

    Thanks a million.

    It's been quite a while since I used SQL Server Central - there used to be...

  • RE: Complex Windowed Sum

    Thank you for your prompt reply.

    I just got harpooned in a staff meeting, so I will try it later tonight.

    Regards

  • RE: perform an activity on each database on the server

    Isn't using undocumented procedures simply asking for trouble ?

  • RE: Updating a View with CHECK

    I definitely have to bone up on the WITH CHECK option.

    Thank you for bringing this up Steve.

    Learn something new every day.

  • RE: Convert Columns to Rows

    tripleAxe (9/15/2016)


    Some basic testing on my VM using the original table as posted but with 12 million rows of data has the UNION ALL query taking 6 seconds with the...

  • RE: Convert Columns to Rows

    Eirikur Eiriksson (9/15/2016)


    Here is a simple test harness which you can use

    Again, another example of multiple senior contributors moving the goal posts farther away to better explore the subject, even...

  • RE: Convert Columns to Rows

    Thank you for taking the time of finding the links.

    Will definitely look them up.

    Regards

  • RE: Convert Columns to Rows

    J Livingston SQL (9/14/2016)


    j-1064772 (9/14/2016)


    Clear explanation, thank you all.

    Still not in the mindset of a million rows ... My DB's are considerably more modest.

    "Still not in the mindset of a...

  • RE: Convert Columns to Rows

    Clear explanation, thank you all.

    Still not in the mindset of a million rows ... My DB's are considerably more modest.

  • RE: Convert Columns to Rows

    tripleAxe (9/14/2016)


    How about this.....

    SELECT 'AZ' [STATE], SUM(AZ) [VAL] FROM EXAMPLE

    UNION ALL

    SELECT 'NY' [STATE], SUM(NY) [VAL] FROM EXAMPLE

    UNION ALL

    SELECT 'PA' [STATE], SUM(PA) [VAL] FROM EXAMPLE

    Yes, this was my question from the...

  • RE: Small rounding

    Got surprised by that one. Not particularly intuitive.

    Not that I would have committed it to production code, I would have found out by testing it.

    By the way, this one...

  • RE: A Case FOR Cursors...

    RonKyle (6/1/2015)


    While a programmer, I never heard that GOTO was bad. Why is that so bad?

    A bit of ancient history.

    The problem with the GOTO was magnified by the style...

Viewing 15 posts - 1 through 15 (of 229 total)