Viewing 15 posts - 2,326 through 2,340 (of 10,144 total)
DavidDroog (7/23/2015)
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...
July 24, 2015 at 5:50 am
DavidDroog (7/22/2015)
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...
July 23, 2015 at 1:43 am
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...
July 22, 2015 at 2:18 am
Sean Lange (7/16/2015)
SQLRNNR (7/16/2015)
Sean Lange (7/16/2015)
July 17, 2015 at 1:47 am
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...
July 15, 2015 at 7:12 am
-- 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...
July 15, 2015 at 6:56 am
Instead of updating the temp table, why not calculate the value when you populate it, like this:
SUM(DayCount) OVER(PARTITION BY Loss_State)
July 15, 2015 at 1:46 am
TomThomson (7/13/2015)
Lynn Pettis (7/13/2015)
July 14, 2015 at 7:02 am
jghali (7/13/2015)
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 =...
July 13, 2015 at 7:26 am
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...
July 13, 2015 at 5:44 am
-- 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...
July 10, 2015 at 9:34 am
HerryMarkowitz (7/10/2015)
ChrisM@Work (7/10/2015)
HerryMarkowitz (7/10/2015)
But I dont want to see 102, 103, 104, 105, 106 lines in the sql code.
I want a...
July 10, 2015 at 6:47 am
HerryMarkowitz (7/10/2015)
But I dont want to see 102, 103, 104, 105, 106 lines in the sql code.
I want a loop code...
July 10, 2015 at 6:35 am
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...
July 10, 2015 at 6:17 am
HerryMarkowitz (7/10/2015)
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...
July 10, 2015 at 5:26 am
Viewing 15 posts - 2,326 through 2,340 (of 10,144 total)