Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 2,462 total)

  • RE: A Case FOR Cursors...

    Brian J. Parker (6/5/2015)


    RonKyle (6/5/2015)


    That's a different but interesting topic. For that I have a separate Holiday table.

    I agree that that's a better way. It's been on my list...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: A Case FOR Cursors...

    Jeff Moden (6/5/2015)


    Brian J. Parker (6/5/2015)


    This is completely branching off the topic of the original article, but... I've grown accustomed to instantiating a Tally table whenever possible in any database...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: A Case FOR Cursors...

    RonKyle (6/5/2015)


    Why do you need the hour? Is that necessary to populate the date when it's just the date? I'm intrigued by this method, but not sure it...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Should Salary Information Be Confidential?

    Not sure if anyone mentioned this yet but I figured I'd add in:

    US military jobs, even civilian ones on bases, have ranks, and the pay for each rank is known...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: To add a report drillthrough action to your report

    tuktukg (6/5/2015)


    gotcha.....but how do i set the parameter to be the correct agentname on that row then pass it to the agent report?

    T

    Perhaps I'm missing your question and don't have...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: To add a report drillthrough action to your report

    If you're using text box properties > action > go to report you have the option to include parameters.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: A Case FOR Cursors...

    RonKyle (6/5/2015)


    Populating a date dimension can be done using a tally table. No loop necessary.

    The code executes faster but it is also a LOT simpler to write than a loop.

    The...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Should Salary Information Be Confidential?

    robert.sterbal 56890 (6/5/2015)


    Most government jobs have published salaries.

    This is for Illinois teachers:

    http://www.familytaxpayers.org/ftf/ftf_salaries.php

    I found a spreadsheet for the city of Pittsburgh at:

    https://docs.google.com/spreadsheets/d/1AgIDIpQ4B-u0C2RrnYFEgdnpJKlWH0qyBGkhRTiOK9A/edit?pli=1#gid=0

    That's totally different because we, as tax payers, pay those...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Should Salary Information Be Confidential?

    steeleye1 (6/5/2015)


    It seems to me that the only reason that it can be a "disaster" to share salary information is because of inequality.

    I'm guessing that was in response to my...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Can we have multiple instances running on SQL server 2014

    Yes, and it's common to have machines with multiple instances. When you run the setup you have the option to add a new instance. You can have multiple instances of...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: New T-SQL Functions: How to modify an ORDER BY clause at run-time using a parameter

    j-1064772 (6/5/2015)


    [font="Comic Sans MS"]This also does not help with the added complexity of wanting it sorted up or down![/font]

    Nope. And it can't. Perhaps I should have mentioned that. This is...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: New T-SQL Functions: How to modify an ORDER BY clause at run-time using a parameter

    Jeff Moden (6/5/2015)


    Alan.B (6/4/2015)


    Dynamic SQL as Luis showed is the way to go here. I don't know if this helps; I used my own sample data. Just another way to...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Demystifying the use of CASE in an ORDER BY statement

    ukarjee (4/26/2012)


    Can dynamic sql help?

    yep.

    Edit. Jeez, did not see that this article was a re-run. No coffee yet this morning.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: A Case FOR Cursors...

    RonKyle (6/5/2015)


    cursors are there to be used for admin scripts to be executed manually

    I like this caveat, especially as it now excuses my one use I have for looping in...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: New T-SQL Functions: How to modify an ORDER BY clause at run-time using a parameter

    Dynamic SQL as Luis showed is the way to go here. I don't know if this helps; I used my own sample data. Just another way to go about this:

    DECLARE...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 1,381 through 1,395 (of 2,462 total)