Forum Replies Created

Viewing 15 posts - 796 through 810 (of 2,462 total)

  • RE: Expression Help

    DUPLICATE POST, direct replies here.

    "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: Using reserved words as column names

    Sioban Krzywicki (4/28/2016)


    Yeah, but this is an existing column that I want to rename and they're going to want a performance reason

    There's no performance benefit to using/not using reserved words...

    "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: Expression Help

    Something like this perhaps...

    "MSC000000002" & "C00303582" &"MSC000005747" &....

    "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: Using reserved words as column names

    Something like this would not work:

    CREATE TABLE LovelyTable(

    Join varchar(50)

    )

    SQL Server is generally very good at dealing with reserved keywords as column names but its a terrible practice. Column names like...

    "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: XML to SQL tables

    squvi.87 (4/28/2016)


    any set based approach? with out using cross apply ?

    XML is a different animal...

    When did CROSS APPLY become the "not set based" approach?

    "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: XML to SQL tables

    -- sample table

    DECLARE @demo TABLE

    (

    SomeID int identity, -- you need this to know the source of your XML

    SomeXML XML

    );

    -- insert a couple xml values

    INSERT @demo

    VALUES...

    "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: Replacing multiple characters in a string Dynamically

    Two year old thread but other languages such as PL/SQL, XSLT & SAS have a "translate" function which is a single-character "nested replace" function. This is one of those extremely...

    "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: Replacing multiple characters in a string Dynamically

    zootie (4/27/2016)


    -- Inspired by D. Camps NestedReplace () on http://www.sqlservercentral.com/Forums/Topic1542417-392-1.aspx

    You've written a very interesting function sir, very clever. That line above stood out to me. I don't know if you...

    "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: Trouble with using a list with new columns

    Perhaps it's a shot in the dark and I don't know anything about Sharepoint lists but, if you can write a stored proc that accesses the XML in a SQL...

    "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: Cloud First

    Cloud DB Servers mean you have to rely on architecting your solution correctly and designing your schema properly. Failing to do so results in a big bill every month.

    The ability...

    "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: free the cache - SQL Server Server

    I'm with Jeff - sounds like your stats are not getting updated. You should check your Auto Update Statistics setting for your databases (right click DB, go to options).

    "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: Calculate Age (in years)

    Jeff Moden (4/10/2016)


    From the Article:


    See Comments in the code for more details.

    Awesome. I don't very often see such a useful bit of header information. You've provided a succinct...

    "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: Calculate Age (in years)

    MadAdmin (4/26/2016)


    What should the results for these test cases be?

    SELECT age FROM dbo.YearsApart('2/28/2002','02/28/2003');

    SELECT age FROM dbo.YearsApart('2/28/2003','02/28/2004');

    SELECT age FROM dbo.YearsApart('2/29/2004','02/28/2005');

    SELECT age FROM dbo.YearsApart('03/01/2004','03/01/2005');

    Edit : Seems that how you handle leaplings depends...

    "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: String Together Mulitple fields when not NULL

    rjjh78 (4/27/2016)


    thank you very much!

    Make sure not to use my solution (not my best work - but I was in a hurry). Both Jeff and Luis posted brilliant solutions. I...

    "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: Problems processing a measure group in SSAS 2012

    Thanks PB_BI. After a little more analysis I discovered that it was in fact an issue related to stale metadata which was resolved by restarted the SSAS service.

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