Viewing 15 posts - 16 through 30 (of 63 total)
J Livingston SQL (1/21/2016)
ok...which bit?is it the "CASE" statement or the "SUM OVER".....or ?
This part
"SUM OVER" & "ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW"
Thanks!
January 21, 2016 at 11:16 am
yb751 (1/21/2016)
ssc_san (1/21/2016)
Thank you yb751!The real data has dates, but I wanted to simplify it.
Thank you!
At least you provided the sample data which is more than some. 😉
Good to know...
January 21, 2016 at 10:54 am
J Livingston SQL (1/21/2016)
ssc_san (1/21/2016)
Thank you J Livingston SQL! It worked.thanks...but do you understand how?
I'm trying to, but it would help If you could provide a brief explanation.
Thanks much!
January 21, 2016 at 10:51 am
Thank you yb751!
The real data has dates, but I wanted to simplify it.
Thank you!
January 21, 2016 at 8:38 am
Thank you J Livingston SQL! It worked.
January 21, 2016 at 8:36 am
Thanks you Luis C and Micky! Both the solutions worked like charm.
April 8, 2014 at 2:06 pm
Hi, Thanks for the reply.
Sorry, forgot to mention, there is a seq number.
CREATE TABLE #xy123
(
tktamt MONEY,
...
April 7, 2014 at 1:08 pm
Thanks for the reply Abu Dina and Ed Wagner!
We have SQL sever 2000 database, I am not sure If I can use this in SQL server 2000?
Thanks!
September 5, 2013 at 7:03 am
Okay Lynn Pettis, Actually I want to code for the 'O' part of the case statement and populate a flag, that is the reason, I was trying to re-write it...
April 5, 2013 at 4:07 pm
Thanks for the reply Lynn Pettis.
There are two records with a value of '1' for column c1, t1 value for those records is null where as t2 has values as...
April 5, 2013 at 3:37 pm
ColdCoffee (7/17/2012)
ssc_san (7/17/2012)
ColdCoffee (7/17/2012)
ssc_san (7/17/2012)
We have a issue here, they may add other adjustment periods in the future, so it is not a fixed set of periods.
Meaning, 0,9,13,14,16 will...
July 17, 2012 at 2:17 pm
ColdCoffee (7/17/2012)
ssc_san (7/17/2012)
We have a issue here, they may add other adjustment periods in the future, so it is not a fixed set of periods.
Meaning, 0,9,13,14,16 will have other...
July 17, 2012 at 1:59 pm
Thanks for the query Coldcoffee.
We have a issue here, they may add other adjustment periods in the future, so it is not a fixed set of periods.
Any other method...
July 17, 2012 at 1:49 pm
Try this:
DECLARE @testagg TABLE
(
id VARCHAR(10),
nm VARCHAR(20),
amt INT...
July 17, 2012 at 1:22 pm
Viewing 15 posts - 16 through 30 (of 63 total)