Forum Replies Created

Viewing 15 posts - 2,236 through 2,250 (of 2,462 total)

  • RE: Parsing a variable for a where clause

    Misread the requirement. Comment removed.

    "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: Greater/Less than on text column

    Something like this perhaps:

    IF OBJECT_ID('tempdb..#tmp') IS NOT NULL

    DROP TABLE #tmp;

    CREATE TABLE #tmp (val varchar(10) primary key)

    GO

    INSERT INTO #tmp

    SELECT '5'UNION ALL

    SELECT '6DN'UNION ALL

    SELECT '7'UNION ALL

    SELECT '10'UNION ALL

    SELECT '11DN'UNION ALL

    SELECT '12'UNION ALL

    SELECT...

    "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: Indexed view

    SQL_Surfer (5/29/2013)


    Is it a good idea to put index on view? Some of the views are taking longer to execute and I am thinking about putting index on views. 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: Counting duplicates

    Lynn Pettis (5/28/2013)


    Alan.B (5/28/2013)


    OTF (5/22/2013)


    phc (5/18/2013)


    I have gotten a bit further on by nesting a query, but I am not sure I have the distinct right

    SELECT C.first_name"Provider", Count(C.provider_no) "Diabetics with...

    "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: Counting duplicates

    OTF (5/22/2013)


    phc (5/18/2013)


    I have gotten a bit further on by nesting a query, but I am not sure I have the distinct right

    SELECT C.first_name"Provider", Count(C.provider_no) "Diabetics with over 1 BP...

    "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 XML Datatype present in SQL Server.

    Sergiy (5/8/2013)


    Alan.B,

    I think you missing the point.

    The question was not about use of XML in real life, but about why we cannot store XML files using good old nvarchar/ntext data...

    "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 XML Datatype present in SQL Server.

    Shadab Shah (5/7/2013)


    Hi all experts,

    Every now and then i am learning something new in SQL Server. Latest in that series is XML Datatype. While learning XML datatype i came 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: crystal reports version 8 user guide

    Thanks Ben and sorry for the late reply. I am able to find 8.5 (and 7.0) via download but not 8.0. Not a big deal, thanks for checking!

    "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: Split a range of numbers in equal parts

    Eddie Wuerch (4/27/2013)


    This is pretty much what the NTILE() windowed function is for - equally dividing a results set into x number of pieces. Unlike throwing calculations at the min...

    "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: Name Parser

    jamoore (4/22/2013)


    Thank you, Alan... that helps. Looking forward to taking a look at the regular expression if you can find it.

    What I have here won't be a complete solution 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: Name Parser

    This is a tricky one. You could use Regular expressions for this; there is a good script for this in the Regular Expressions Cookbook by O'Reilly which I will try...

    "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 find values in a comma delimeted string with len>3

    labri (4/19/2013)


    Thank you all for your answers! I found what I needed using the

    Alan.B's query.

    I'm glad that worked for you. It is worth noting that my query was 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: How to find values in a comma delimeted string with len>3

    Lynn Pettis (4/19/2013)


    Here is the testing:

    set nocount on;

    -- sample data

    IF OBJECT_ID('tempdb..#x') IS NOT NULL

    DROP TABLE #x;

    CREATE TABLE #x (id int identity primary key, val nvarchar(100) NOT NULL);

    GO

    INSERT INTO #x...

    "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: Update on ID's

    RexHelios (4/19/2013)


    Would you mind elaborating, AJB? I didn't quite get it. I used inner join since I thought, if there is no match no update is required.

    - Rex

    I 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: How to find values in a comma delimeted string with len>3

    It's work noting that wolfkill and I are using the same splitter[/url] (I mine just has a different name).

    -- sample data

    IF OBJECT_ID('tempdb..#x') IS NOT NULL

    DROP TABLE #x;

    CREATE 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

Viewing 15 posts - 2,236 through 2,250 (of 2,462 total)