Viewing 15 posts - 1 through 15 (of 1,922 total)
That condition cannot happen per our design.
June 7, 2016 at 11:27 pm
Hi Sergiy, thats condition # 2, isnt it?
June 5, 2016 at 10:57 am
Eirikur, thanks for the reply. I am still not convinced.
I have added a condition PreviousdayClose <> 0 in CTE1 to exactly handle situations like this, where LEAD is seeding...
June 5, 2016 at 10:48 am
Thanks, Erland. That makes sense. But are you aware of any way to work around it?
My requirement:
We have 2 database servers that are replicated via third party replication technology....
April 9, 2016 at 10:21 am
Thanks for the advices and tips guys. Regarding indexes, i have tried all sorts of indexes (filtered/covered/clustered/non-clustered), and have optimized the query. But I was more interested to know if...
March 21, 2016 at 1:36 am
Jeff Moden (6/13/2014)
ColdCoffee (6/13/2014)
Do we have a readymade 10 million/1million row generator for this problem?
Heh... apparently, you didn't read the article where is says... 😉
The code above isn't adequate for...
June 17, 2014 at 2:45 pm
Now that we have new analytical functions, just wanted to jump in on the new windowed functions fun 🙂
; WITH CTE AS
(
SELECT P.CustomerID ,P.ProductCode
...
June 13, 2014 at 4:35 pm
Do we have a readymade 10 million/1million row generator for this problem?
June 13, 2014 at 4:19 pm
Can you just remove the T.Cid form the THEN clause and replace it with 0 (zero) and try?
ORDER BY CASE WHEN COUNT(T1.CId) = 1 THEN 0
ELSE COUNT(T1.CId)
...
August 7, 2013 at 12:44 am
My query, without chaning anything, works for tie-breakers too as per your rule (highest of cid should be retrieved). Can you give me a perfect set of example to work...
August 7, 2013 at 12:21 am
You dint understand the part ONLY with the count(*)/count(T1.CiD) or the entire query?
Count(*) yielded the number of rows for CNo. But Count(T1.CiD) will yield the number of rows present in...
August 7, 2013 at 12:02 am
I see your point now
; WITH RankedListed (CNo, CId, [Rank]) AS
(
SELECT T.CNO
,T.CId
,ROW_NUMBER()
OVER ( PARTITION BY...
August 6, 2013 at 11:12 pm
My code exactly does that. Does it not? Can you please tel me what error you are seeing with my code?
August 6, 2013 at 10:19 pm
Whoa.. with 542 posts, you still dont know how to post questions which will yeild best possible replies?
Please read these links and post your question more legibly:
August 6, 2013 at 1:24 am
How about this?
; WITH RankedListed (CNo, CId, [Rank]) AS
(
SELECT T.CNO
,T.CId
,ROW_NUMBER()
OVER ( PARTITION BY T.CNO
...
August 6, 2013 at 12:57 am
Viewing 15 posts - 1 through 15 (of 1,922 total)