Forum Replies Created

Viewing 15 posts - 1,561 through 1,575 (of 2,458 total)

  • RE: Need To Improve View Performance

    This is what I came up with:

    SELECT

    ab.AddressCode,

    AddressInstance = ROW_NUMBER() OVER (Partition by ab.AddressCode ORDER BY (SELECT (NULL))),

    ab.PostCode,

    AddressLine1 = title_1,

    ...

    "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 is MSBI market in India

    super48 (4/21/2015)


    Hello,

    I have total 2.6 years experienced in ssis,ssrs,ssas.still I don't feel I have enough experience on these tools.

    even though I have knowledge I didn't worked on many features...

    "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: Time sheet, rates, date dependent

    Hello and welcome to SSC. I am not clear about what the purpose of the billing table is again. How does this table get updated and what's it's purpose?

    Just...

    "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: While loop in sql

    caojunhe24 (4/21/2015)


    the problem I was facing was that month is not reset after the second loop run.

    so month should be reset in the first loop before second loop starts.

    While (@year...

    "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: Accessing Functions in Master Data Services..

    No problem. Glad to help.

    "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: While loop in sql

    This is a job for a Tally Table! Read this article and it will change your life:

    The "Numbers" or "Tally" Table: What it is and how it replaces a...

    "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: Help needed- Generate 8 char Alphanumeric Unique Sequence

    I'm with Sean - this is a bizarre requirement. This will get you started...

    WITH

    E1 AS (SELECT N FROM (VALUES (1),(1),(1),(1),(1),(1)) t(N)),

    E2 AS (SELECT TOP 26 N = ROW_NUMBER() OVER...

    "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: Compare column in two tables

    Minnu (4/21/2015)


    Hi Team,

    The solution provided by are working fine..

    but there is a change in my result.

    my request is

    if a record_1 is in Table_A and Table_B, then

    output : record_id_1...

    "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: Probably a stupid query question...

    dwain.c (4/20/2015)


    Sean Grebey (4/20/2015)


    dwain.c (4/20/2015)


    With regards to your thread's subject:

    The only stupid query questions are the ones you don't ask.

    Lol I feel like it was an easy question but I'm...

    "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: Accessing Functions in Master Data Services..

    I used to have all of the functions and stored procs but can't find them at the moment.

    If you create the Master Data Services DB (#1) you just need 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: Get just the .mdf and .ldf names not the path.

    ScottPletcher (4/20/2015)


    Alan.B (4/17/2015)


    Nope, not that I am aware of. Not without using a sp_cmdshell or other non-tsql scripting tool

    What's wrong with this?

    SELECT

    DbName = db.name,

    FileType...

    "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: Primary XML Index Worse Than No Index

    I have run into the exact same thing. I can say that I have had some (limited) success with secondary XML indexes. XML indexes are are kind of a black...

    "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: Compare column in two tables

    . I figured I'd add my take since I was already looking into it. Often there are more than a few ways to skin the proverbial cat. ;-)

    I think it's...

    "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: APPLYING PATCHES

    Take a look at this: SQL Server failover cluster rolling patch and service pack process[/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: how to perform sorting and filtering in stored procedure with performance optimization?

    The logic you are looking for would look like this:

    DECLARE

    -- possible values: 'Starts With', 'Is Equal to', 'Not Equal to'

    @filterType varchar(20) = 'Starts With',

    @filterValue varchar(100) = 'abc';

    SELECT *

    FROM...

    "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 - 1,561 through 1,575 (of 2,458 total)