Forum Replies Created

Viewing 15 posts - 1,576 through 1,590 (of 2,462 total)

  • 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

  • RE: Compare column in two tables

    Was stuck trying to do without cte/subquery... Using my sample data above:

    SELECT

    Col1 = ISNULL(a.name,b.name),

    Col2 = CASE ISNULL(a.name,'') WHEN '' THEN 'Table B' ELSE 'Table A' END

    FROM @tableA...

    "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 was thinking....

    DECLARE @tableA TABLE (id int, name varchar(20));

    DECLARE @tableB TABLE (number int, name varchar(20));

    INSERT @tableA VALUES

    (101,'Dante'),

    (102,'Henry'),

    (103,'Harold'),

    (104,'Arnold');

    INSERT @tableB VALUES

    (102,'Dante'),

    (107,'Gilbert'),

    (109,'Harold'),

    (110,'Arnold'),

    (106,'Susan'),

    (112,'Marian');

    WITH names AS

    (

    SELECT a = a.name, b = b.name

    FROM @tableA...

    "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: SSIS Design Pattern - Staging Delimited Flat Files

    Great article Sam. Simple, to the point, easy read - well done sir!

    "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: Any way to run an existing report back through the report Wizard?

    I could be wrong but I don't think so. To my knowledge the wizard is only available when you select "New Report".

    "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: SQL Developers

    I was a DBA turned developer in 2010. I like administration but love development. If you are interested in a career as a SQL Developer you should consider getting up...

    "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: please help, script not working getting msg 245

    sandy.alvarez (4/17/2015)


    BMC_CORE_BMC_BaseElement.Name, BMC_CORE_BMC_BaseElement.instanceid,

    BMC_CORE_BMC_BaseElement.reconciliationidentity

    FROM ARSystem.dbo.BMC_CORE_BMC_BaseElement BMC_CORE_BMC_BaseElement (NOLOCK)

    WHERE BMC_CORE_BMC_BaseElement.DatasetId='BMC.ASSET' AND

    BMC_CORE_BMC_BaseElement.createdate>='2014-01-01' AND

    BMC_CORE_BMC_BaseElement.createdate<='2014-12-31' AND (

    BMC_CORE_BMC_BaseElement.submitter='syl'OR

    BMC_CORE_BMC_BaseElement.submitter='salv'OR

    BMC_CORE_BMC_BaseElement.submitter='aj') order by 1

    You're missing a SELECT statement. Using NOLOCK removes the guarantee that...

    "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: selective UNIONing

    dmodersk (4/17/2015)


    Wow thanks Alan! If I explain how I am interpreting this can you confirm if I am correct?

    First, a temp result set is created with all the rows...

    "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: Clustering and mirroring realtime interview questions

    I have not worked with SQL Server HA technologies (clustering, mirroring, replication, Log Shipping) since I was a DBA but I'll give you a few questions and the thinking behind...

    "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 XQuery modify 'replace value of' using a table column value as the new value

    Ok, I put together some DDL and sample data... I screwed up the aliases a little compared to what you have but this should still suffice. What you are doing...

    "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 XQuery modify 'replace value of' using a table column value as the new value

    DDL and sample 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: Get just the .mdf and .ldf names not the path.

    Excellent, glad that worked for 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

Viewing 15 posts - 1,576 through 1,590 (of 2,462 total)