Forum Replies Created

Viewing 15 posts - 2,011 through 2,025 (of 2,462 total)

  • RE: Stairway to SQLCLR Level 1: What is SQLCLR?

    Great Article Solomon. Very easy read and informative. I have been looking forward to a SSC Stairway on CLRs for a long time and look forward to the rest 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: The new Analytic functions in SQL Server 2012

    I just read this article. Great work Wayne.

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

    Minnu (12/17/2013)


    Hi Team,

    Please help in below query, it should return TRUE.

    DECLARE @req_1 varchar(50)

    DECLARE @req_2 varchar(50)

    set @req_1='AAM'

    set @req_2='VVE'

    if (@req_1 !='AAM' OR @req_2 !='VVE')

    print 'TRUE'

    ELSE

    print 'FALSE'

    It's worth noting that 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: SQLServerCentral apologizes and you can win a book

    kennethrbell (12/12/2013)


    Last evening I went to a Pacific NW SQL user group meeting. The guest speaker was Itzik Ben-Gan.

    Before that:

    I opened the “Apologies…” email last week from SQLServerCentral.com (very catchy...

    "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: what is the use of Over Clause

    Duh... Here's a few more :hehe:

    http://www.sqlservercentral.com/Forums/Topic1519856-824-29.aspx#bm1522006

    "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 few reflections on RBAR by a weary application developer

    patrickmcginnis59 10839 (12/9/2013)


    peter-757102 (12/9/2013)


    Charles Kincaid (12/9/2013)


    So let's take an example of a SELECT that does not make any use of indexes.

    RBAR fetches more rows from the table. False. ...

    "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: SQLServerCentral apologizes and you can win a book

    bhw0006 48811 (12/9/2013)


    This is awesome ya'll are doing this

    if object_id('tempdb..#table') is not null drop table #table

    go

    select first_name, last_name, age

    into #table

    from (

    select 'Chuck' as first_name, 'Norris' as last_name, '32' as...

    "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: Merge - Pros and cons

    Dwain Camps posted a great article on Performance of the SQL MERGE vs. INSERT/UPDATE[/url].

    "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: what is the use of Over Clause

    Here's a good article by Robert Sheldon with some examples:

    Working with Window Functions in SQL Server[/url]

    "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: SQLServerCentral apologizes and you can win a book

    Plagiarism stinks.

    ...on that note, here's an ITVF that uses ROW_NUMBER() for calculating the longest common substring.

    -- (1) Function to find the longest common substring

    CREATE FUNCTION CommonSubstrings(@s1 varchar(8000),@s2 varchar(8000))

    RETURNS...

    "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: High-Performance Transact-SQL with Window Functions

    dwain.c (12/3/2013)


    GordonLiddy (12/3/2013)


    This article is a complete ripoff from Itzik Ben-Gan's book Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions! Nowhere is there any credits to the original author...

    "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: Query approach

    This should get you what you need:

    WITH

    xxx AS

    (

    SELECTpe.IPCode AS pe_ip,

    pr.IPCode AS pr_ip,

    pr.ID,

    DENSE_RANK() OVER (PARTITION BY pr.IPCode ORDER BY ID) AS x

    FROM Person pe

    CROSS APPLY [Profile] pr

    WHERE pe.IPCode=pr.IPCode

    ),

    qualifiers...

    "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 display totals grand total in t-sql

    Jeff Moden (11/20/2013)


    Alan.B (11/20/2013)


    clayman (11/20/2013)


    Jeff Moden (11/19/2013)


    clayman (11/19/2013)


    dastagiri16 (11/19/2013)


    hi,

    i need the text like "TOTAL" ...rollup wont give it...

    Please advice

    Use SSRS

    BWAAAA-HAAAA!!!! Sure it's easy to get to 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: Count for each account no -parent and childsql

    Operating under the assumption that items beginning with L are children:

    DECLARE @lines TABLE

    (line_no int,

    code varchar(3) not null,

    account_no varchar(10) not null)

    INSERT @lines

    SELECT Line_no = 123,...

    "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 display totals grand total in t-sql

    clayman (11/20/2013)


    Jeff Moden (11/19/2013)


    clayman (11/19/2013)


    dastagiri16 (11/19/2013)


    hi,

    i need the text like "TOTAL" ...rollup wont give it...

    Please advice

    Use SSRS

    BWAAAA-HAAAA!!!! Sure it's easy to get to the moon. All...

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