Forum Replies Created

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

  • 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

  • RE: Should Salary Information Be Confidential?

    I had boss once, a VP, who was not all that bright and he would share his Outlook calendar; nothing wrong with that - we all shared our calendars (and...

    "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: incement by 5 starting at 5

    I have a get numbers function that I use for exactly this sort of thing. It comes in handy often...

    IF OBJECT_ID('dbo.GetNumsAB','IF') IS NOT NULL

    DROP FUNCTION dbo.GetNumsAB;

    GO

    CREATE FUNCTION dbo.GetNumsAB(@low int, @high...

    "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: The right way to query an extended events session?

    Grant beat me to it.

    I only just started using extended events and have a lot to learn but I have found that querying the file directly has been pretty...

    "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: Usage of CTE - Trick with Dates

    HLogic (6/4/2015)


    nycdotnet (6/18/2013)


    Interesting article. Regarding the paradox of semicolons on CTEs - the rule is "the statement before the CTE has to end with a semicolon".

    I believe...

    "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,458 total)