Forum Replies Created

Viewing 15 posts - 2,326 through 2,340 (of 10,144 total)

  • RE: Extra join is killing query

    DavidDroog (7/23/2015)


    Hi All

    Surprised this thread was still going when logged in this morning. ChrisM - I didn't realise people were actually offering to optimise my query, but if that is...

  • RE: Extra join is killing query

    DavidDroog (7/22/2015)


    Hi Guys

    thanks for the replies.

    ...

    @chrism-2 - Yes, it does look complicated and there may be a couple of unecessary joins, but it works fine without the addition of the...

  • RE: Extra join is killing query

    The original query appears to be "For each client, get all the products and all their colours". The other tables in the query could filter the output by geography but...

  • RE: Are the posted questions getting worse?

    Sean Lange (7/16/2015)


    SQLRNNR (7/16/2015)


    Sean Lange (7/16/2015)


    Another thing to do in Seattle...of course the NW is known for having lots of microbreweries but what often goes unmentioned is that many of...

  • RE: Fastest way to retrieve the result

    Or rather this:

    -- This table holds account positions data that are appended to multiple times a day

    -- what is the efficient way to retrieve the first set of positions...

  • RE: Fastest way to retrieve the result

    -- Determine the most recent load_id, use it as a filter.

    -- It will be about as fast as it can get without adding

    -- additional indexes because load_id is the leading...

  • RE: Syntax Error IS NULL

    Instead of updating the temp table, why not calculate the value when you populate it, like this:

    SUM(DayCount) OVER(PARTITION BY Loss_State)

  • RE: Are the posted questions getting worse?

    TomThomson (7/13/2015)


    Lynn Pettis (7/13/2015)


    OMG! How does Silver Spoon keep his job? Member of ssc for over 10 years and can't seem to do the simplest tasks without running to...

  • RE: Please Help - trying to eliminate "used tempdb to spill data"

    jghali (7/13/2015)


    Thanks for your response...

    1. the execution plans of the Row_number for:

    SELECT *, rn = ROW_NUMBER() OVER(PARTITION BY [UPC], [LocGroup] ORDER BY PriceLvl) FROM #Master_TAB

    SELECT *, rn =...

  • RE: Please Help - trying to eliminate "used tempdb to spill data"

    Firstly, ROW_NUMBER() doesn't necessarily invoke a sort. Compare the execution plan of these two queries:

    SELECT *, rn = ROW_NUMBER() OVER(PARTITION BY [UPC], [LocGroup] ORDER BY PriceLvl) FROM #Master_TAB

    SELECT *, rn...

  • RE: Please Help - trying to eliminate "used tempdb to spill data"

    -- The outer query makes little sense, it only adds duplicate rows to a set which you're eliminating rows from

    SELECT MT.A3+MT.A4 AS A34, MT.A3

    -- ,M.*

    FROM Master_TAB M

    JOIN...

  • RE: How to shortening this sql code?

    HerryMarkowitz (7/10/2015)


    ChrisM@Work (7/10/2015)


    HerryMarkowitz (7/10/2015)


    I want INVENNO 101, 102, 103, 104, 105, 106, 107.

    But I dont want to see 102, 103, 104, 105, 106 lines in the sql code.

    I want a...

  • RE: How to shortening this sql code?

    HerryMarkowitz (7/10/2015)


    I want INVENNO 101, 102, 103, 104, 105, 106, 107.

    But I dont want to see 102, 103, 104, 105, 106 lines in the sql code.

    I want a loop code...

  • RE: How to shortening this sql code?

    HerryMarkowitz (7/10/2015)


    I am so sorry but my English is not perfect.

    Let me tell you what I understand;

    A loop code is possible but not efficient.

    Is that what you told?

    The code I...

  • RE: How to shortening this sql code?

    HerryMarkowitz (7/10/2015)


    Hi again,

    Thanks for the codes.

    But your codes are not what I want.

    Maybe I am not able to explain my needs because I am very new with SQL coding.

    Let me...

Viewing 15 posts - 2,326 through 2,340 (of 10,144 total)