Forum Replies Created

Viewing 15 posts - 496 through 510 (of 1,228 total)

  • RE: Get running total in the following query

    XMLSQLNinja (7/18/2012)


    ...

    There are other ways to do this but using recursion is generally the fastest.

    Recursion is the third fastest; CLR > "Quirky Update" > rCTE > cursor > triangular join....


    [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: Grouping and Sorting sequential data by street address

    darthurfle (7/19/2012)


    Hi,

    Does anybody have a solution for this problem?

    Many Thanks!

    Without a sample data script to work with? Figure out the algorithm for generating the numbers in the seq column, filtering...


    [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: Delete, Insert and update in the same query

    Have a look at Peter Larsson's Composable DML blog entry.


    [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: The Beer Cooler Thread

    anthony.green (7/10/2012)


    I had a couple of pints of St Austell's Tribute on Saturday, that was a good tasting ale

    http://www.staustellbrewery.co.uk/beers/cask-beers.html

    This weekend is the Tewkesbury Medieval Festival[/url] where our band of brothers...


    [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: FROM clause challenge

    JayWinter (7/12/2012)


    In this case SKU and UPC are the same and therefore its usage is correct. However my challenge is that there may be more than 1 record that meets...


    [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: FROM clause challenge

    JayWinter (7/12/2012)


    Is the statement below correct?

    I.SKU will be used to retrieve a record from from ITEMMAST when either J.SKU=I.SKU or J.ITEMUPC=I.SKU

    FROM

    Evy_RH_Objects.dbo.RETAIL_SALES I

    INNER JOIN RH2007_EvyLive.dbo.ITEMMAST J on...


    [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: Are the posted questions getting worse?

    Evil Kraig F (7/12/2012)


    A request to the threadizens, please don't pile on TeraByteMe if you happen across our little spat, at least not on my behalf. If it continues...


    [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: Help me in improving the SQL query,Please

    Next, put repeated correlated subqueries into the FROM list as OUTER APPLY. What's left is fairly straightforward except for the remaining correlated subqueries in the output;

    DECLARE @strBE NVARCHAR(4)

    SET @strBE ='1000'

    ...


    [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: Help me in improving the SQL query,Please

    Jeff's nailed all the reasons for rewriting this query from scratch, and I agree, chuck it away and start again. However, sometimes you can gain from having a baseline in...


    [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 code

    debris_flow (7/6/2012)


    Imagine a table which contains records for all weekly number of bugs

    discovered by each QA analysts in the team for one year. Please describe a

    simple SQL statement for identifying...


    [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: Index on View in query plan.

    Shcherbunov Neil (7/6/2012)


    1. SQL Server won't sub in an indexed view if the query is trivial - and it is.

    My guess - this statement bears the stamp of truth. If...


    [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: How to reduce time in adding PK constraint on a table?

    coronaride (7/3/2012)


    What do you mean when you say "enforced?" No, the clustered index is not unique.

    I think I may see what you're getting at. Are you saying that when...


    [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: How to reduce time in adding PK constraint on a table?

    coronaride (7/3/2012)


    I thought that the ONLINE specifiers were for indexes only. I'm only talking about a constraint. There's already a clustered index on the table and I don't want 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: How to reduce time in adding PK constraint on a table?

    coronaride (7/3/2012)


    To be perfectly honest, I'm astounded with the responses I've gotten. Most people don't seem to know that there's a difference between an index and a primary key constraint....


    [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: Name the things that were supposed to cause the End Of The World

    Lowell (7/2/2012)


    ChrisM@home (7/2/2012)


    Nige.

    ok even with my awesome Google-Fu skills, I'm not getting the reference.

    "The end of the world is Nige". Don't you watch monochrome movies, Lowell?


    [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 - 496 through 510 (of 1,228 total)