Forum Replies Created

Viewing 15 posts - 46 through 60 (of 1,228 total)

  • RE: Encapsulating complex logic without using a scalar UDF

    Aaron N. Cutshall - Wednesday, March 8, 2017 11:12 AM

    I have business logic for date comparisons that go beyond the typical DATEDIFF...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Retrieve value from a string

    PSB - Monday, March 6, 2017 10:34 AM

    Hi,

    I want to retrieve the ID value from CustomFields and insert into CustomID and get...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Indexing Small Temp Tables used to JOIN based on a value being in a range...

    sgmunson - Tuesday, February 28, 2017 1:23 PM

    Just wondering if there's much I can do to improve a query that has to...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Indexing Small Temp Tables used to JOIN based on a value being in a range...

    sgmunson - Tuesday, February 28, 2017 1:23 PM

    Just wondering if there's much I can do to improve a query that has to...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: sql debugger enabling in the production server without admin privileges?

    Rankerg - Sunday, February 19, 2017 3:42 PM

    Hi

    I am trying to help my DBA so that I get the DEBUGGER enabled ?...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period

    RellB - Monday, February 20, 2017 12:52 PM

    I have a table that has Machinename that looks like the following:

    TH1239.CDB.LOCAL
    TH1238.CDB.LOCAL
    TH1237.CDB.LOCAL
    TH1236.CDB.LOCAL
    TSB1-TLA.CDB.LOCAL
    TSB2-TLA.CDB.LOCAL

    I would like to...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Find Matching People in table based on similar values

    ChrisM@Work - Tuesday, June 19, 2012 3:32 AM

    Fuzzy matching generates a similarity index between two strings: try this and this. Cheers ChrisM


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Optimizing a query

    JKSQL - Monday, February 20, 2017 1:06 PM

    The Nolocks is how they want views written for reports so there are less page...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: TSQL query help

    Here's a very simple alternative which also might work:
    SELECT
     Srvname,
     [status] = 'Failed',
     MIN(run_dt),
     MAX(run_dt),
     grp = dd-rn,
     ConsecutiveDays = COUNT(*)
    FROM (
     SELECT...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Optimizing a query

    Why not read the contacts table in one go?

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

    SELECT
     S.Id,
     s.Id, -- S.ID = T.ID
     x.AssignedContacts_Id,
     x.OwnerType,
     x.[Description]
    FROM...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Query never completes with CXPACKET waits

    Ethan.Hinton - Thursday, February 16, 2017 8:16 AM

    For reference, here are the two query plans on PasteThePlan:  

    Query_that_completed_40_minutes: https://www.brentozar.com/pastetheplan/?id=SJklWSXFl

    Query_not_finishing_still_running: https://www.brentozar.com/pastetheplan/?id=S1OmbS7Fl

    Same...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Query never completes with CXPACKET waits

    Isabelle2378 - Monday, February 13, 2017 11:14 AM

    Hi,
    I agree on the comments that MAXDOP is not the solution or that CXPACKETS is...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Query never completes with CXPACKET waits

    Isabelle2378 - Friday, February 10, 2017 5:45 PM

    Hi,
    This query is coming from an application that I cannot modify.  I am manually running...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: CTE Recursive Query

    robertopmorris - Wednesday, February 8, 2017 12:51 PM

    I have a table with the following fields:
    ParentWO
    IssueQty
    ChildWO
    Production_Qty
    Qty_Complete

    I want to write a recursive statement to...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: find a seq_number with more than one day and return the data in the same row

    littlesun - Saturday, February 4, 2017 4:08 AM

    This is almost what I need but it shouldn't be necessary to write the values...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

Viewing 15 posts - 46 through 60 (of 1,228 total)