Forum Replies Created

Viewing 15 posts - 241 through 255 (of 2,458 total)

  • RE: Cross Join Issue

    I'm not an MDX guru but, what you posted is not the complete MDX code. The complete statement would include (at least) a SELECT and an ON statement. The "Average...

    "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 Can I Write A Query That Sums the Number of Occurrences Of a Value and Groups Them Into Ranges

    Jeff Moden - Tuesday, June 27, 2017 7:15 PM

    Alan.B - Tuesday, June 27, 2017 2:45 PM
    "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: Replace Bad Characters in Table

    Luis Cazares - Wednesday, June 28, 2017 7:00 AM

    I agree with franz, this will be slow. I´m not sure about the performance...

    "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: Replace Bad Characters in Table

    t.franz - Wednesday, June 28, 2017 2:58 AM

    I doubt, that this will be fast. It does not use an explicit cursor, 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: How to add cost per hotel and flight in duration cost table

    This seams pretty simple; what have you tried so far? Where are you stuck?

    "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 Can I Write A Query That Sums the Number of Occurrences Of a Value and Groups Them Into Ranges

    Dang! Ed beat me to it. 

    I would add - for optimal performance you want this index in place: 

    CREATE INDEX nc_poc_employees_level ON dbo.employees(OrganizationLevel);

    "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: Good Book for SQL Server Reporting Services

    I dont know of any great SSRS books but The Microsoft Press book, SSRS Reporting services is fine. For me SSRS is the kind of thing I learn more by...

    "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: Today's Random Word!

    ManicStar - Tuesday, June 27, 2017 7:24 AM

    Ed Wagner - Monday, June 26, 2017 3:54 PM
    "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: SUBSTRING and CHARINDEX query.... please help.

    chocthree - Thursday, June 22, 2017 10:23 AM

    Thanks for your replies.
    I'm at a basic level using SQL so forgive me for 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: SUBSTRING and CHARINDEX query.... please help.

    I created a function called SubstringBetween8K which was designed for exactly this type of problem. It uses NGrams8K. Here's the function:


    CREATE FUNCTION [dbo].[substringBetween8K]

    "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?

    I've been away for awhile wrapping up a project with some hard deadlines but that's all done and I'm 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: Filter single field using comma delimited criteria and delimitedsplit8k

    Jeff Moden's DelimitedSplit8K is the best in the business on pre-2012 systems and non-max data types; on SQL 2012+ I suggest DelimitedSplit8k_LEAD by Eirikur Eiriksson which is based...

    "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: Why Scalar Functions Can Be Costly

    t.ovod-everett - Friday, June 2, 2017 10:55 AM

    Phil Parkin - Monday, January 4, 2016 11:21 AM
    "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?

    I learned something new today: # is a valid temp table name.

    CREATE TABLE #(id int);
    INSERT # VALUES (1);
    SELECT * FROM #;
    DROP TABLE...

    "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: t-sql 2012 parse out multiple values in one field that is varchar(1200)

    wendy elizabeth - Saturday, May 20, 2017 8:29 PM

    The following additional items:
    1. Can you explain --GROUP BY ALL Comment

    "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 - 241 through 255 (of 2,458 total)