Forum Replies Created

Viewing 15 posts - 316 through 330 (of 2,462 total)

  • RE: A Possible Alternative to SQL UNPIVOT

    Interesting technique Paul. Well done.

    "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 Salary Range

    Jeff Moden (1/7/2017)


    Alan.B (1/3/2017)


    Great post Steve, 5 stars.

    I found out a few weeks back that my department is moving to Phoenix AZ. I did not chose to transfer so...

    "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: Stairway to Columnstore Indexes Level 11: Optimizing Queries For Batch Mode (Part 2)

    Fantastic article Hugo. I really love this stairway series - really great stuff.

    "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: Formatting Data for Reporting

    You can also try attaching you tables to Excel and format the data however you'd like there. Excel has become a great reporting tool in recent years.

    "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: Non-alphanumeric Search Frustration

    I think Luis' solution is the way to go. To answer your question about the trailing hyphen - you could go with:

    AND QuestionableColumn NOT LIKE '%-'

    As Drew mentioned, this will...

    "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: Are the posted questions getting worse?

    Luis Cazares (12/27/2016)


    Carrie Fisher is now one with the force.[/url] :crying:

    Can 2016 end already?

    2016: The Movie (Trailer)

    "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: Are the posted questions getting worse?

    Sean Lange (1/3/2017)


    The real downside is that overall it really seems like the number of questions has significantly decreased over the last 6-12 months. Hopefully this is just a trend...

    "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: How to create error conditions inside function

    mcfarlandparkway (1/3/2017)


    Here we are returning 4 columns as I mentioned only one @NUM.

    There is another reason to use table valued function.

    Switching gears a little... If your statement is in response...

    "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: Report Showing Month with Highest Count

    drew.allen (1/3/2017)


    Alan.B (1/3/2017)


    This wont work because you can't nest aggregates like this so we'll have to break out the RANK Window Function like so (including sample data so you can...

    "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: Azure vs AWS for databases

    I'm no expert at either but have worked with both. I'm going to assume that by, "Postgres on AWS" you are talking about Redshift.

    My experience has been that a beefy...

    "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: Report Showing Month with Highest Count

    So what you want is the MAX(COUNT) of sales for each (e.g. "GROUP BY") EmployeeID by Month and Year. Let's start with some sample data; since you did not provide...

    "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 Salary Range

    Great post Steve, 5 stars.

    I found out a few weeks back that my department is moving to Phoenix AZ. I did not chose to transfer so I'll be back...

    "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: Issue with column parsing

    sgmunson (1/2/2017)


    Jeff Moden (12/28/2016)


    IIRC, PARSENAME has an element length of NCHAR(128) as a limit on each part it returns and is heavily dependent on the consistent position of items but...

    "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: Best way to publish 2012 SSRS reports on the web

    Zososql (12/31/2016)


    I have created a series of reports via vs2010shell - SSDT - sql2012, wondering whats the best way to publish these on an intranet where other workers can access...

    "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: Issue with column parsing

    Phil Parkin (12/27/2016)


    Nice, Alan. I saw the word 'split' and I was off like one of Pavlov's four-legged friends. Did not even consider alternatives.

    😛

    I did make the assumption that there...

    "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 - 316 through 330 (of 2,462 total)