Viewing 10 posts - 16 through 25 (of 25 total)
Luis Cazares (2/25/2016)
If your problem is that you have too many columns in the GROUP BY clause, you could use a different approach.
I used a CTE because...
February 25, 2016 at 8:39 am
tindog (2/25/2016)
What's the issue with the first query in your recent post? Also, the second query can't...
February 25, 2016 at 8:24 am
tindog (2/25/2016)
SELECTp.PayID,
e.Name,
c.Name,
SUM(p.Amt1) SumAmt1,
SUM(p.Amt2) SumAmt2
FROM#UserPayments p
INNER JOIN#Employees e ON p.EmpID = e.EmpID
INNER JOIN#Companies c ON...
February 25, 2016 at 7:42 am
I'll try to come up with a solution based on this approach but I find that the simple GROUP BY query would do, what I'll work on the frontend is...
February 3, 2016 at 6:56 am
Thanks for your replies... I'm thinking, its also sort of like the same, isnt it? I mean, you'll need to repeat each year as a new line... But next year...
February 3, 2016 at 6:39 am
Awesome... Solution corrected and thanks for the explanations!
I got one more doubt though :hehe: What would you use on 2005, just out of curiosity, would the final query change that...
January 29, 2016 at 4:30 am
Agghh!! Close but not close enough...
I got it now, final SELECT goes like:
SELECT
Monday,
YEAR(Monday) AS tty,
ROW_NUMBER() OVER(PARTITION BY YEAR(Monday) ORDER BY YEAR(Monday))
FROM CTE_Dates
January 28, 2016 at 12:40 pm
Luis Cazares (1/5/2016)
This could be a safer approach to prevent unwanted duplicate rows.
Ah! This one worked quite prefectly... What would be the best way of repeating this part 9 times...
January 5, 2016 at 11:04 am
Luis Cazares (9/11/2015)
xynergy (9/11/2015)
Its pure awesomeness... Thanks both for your help... I'll carry on working on my...
September 12, 2015 at 1:22 pm
Dude, I just went from 4 minutes to a few seconds on that task!
Its pure awesomeness... Thanks both for your help... I'll carry on working on my frontend...
Cheers! :hehe:
September 11, 2015 at 8:43 am
Viewing 10 posts - 16 through 25 (of 25 total)