Viewing 15 posts - 1 through 15 (of 26 total)
Please see that I have corrected one of the values for the inserts. (last but one)
Insert into #t1
Values (4,5,'Debit' ,'1/5/16', 40,Null)
August 16, 2016 at 3:17 pm
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
August 16, 2016 at 3:15 pm
Hello all,
I have realised that my new data set has more data and more scenarios to be considered to come up with a solution.
During this process I learnt a lot...
August 16, 2016 at 2:27 pm
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
August 16, 2016 at 12:59 pm
J Livingston SQL (8/16/2016)
jssashank (8/16/2016)
J Livingston SQL (8/16/2016)
can I please ask you to explain why you wish to exclude rows where the first row is a debit?
Sure. My intention for...
August 16, 2016 at 11:52 am
J Livingston SQL (8/16/2016)
can I please ask you to explain why you wish to exclude rows where the first row is a debit?
Sure. My intention for adding that is to...
August 16, 2016 at 11:25 am
drew.allen (8/16/2016)
August 16, 2016 at 8:54 am
drew.allen (8/12/2016)
August 15, 2016 at 8:37 pm
The solution is so close. It almost feels like its one where clause that is missing.
August 15, 2016 at 8:34 pm
jssashank (8/11/2016)
J Livingston SQL (8/11/2016)
--code based on ChrisM fine work at http://www.sqlservercentral.com/Forums/Topic1731617-391-1.aspx
CREATE TABLE #t1
(TransactionID INT,
Customer INT,
...
August 15, 2016 at 8:29 pm
drew.allen (8/12/2016)
August 15, 2016 at 11:16 am
drew.allen (8/12/2016)
August 12, 2016 at 5:00 pm
drew.allen (8/12/2016)
jssashank (8/12/2016)
drew.allen (8/11/2016)
;
WITH totals AS (
SELECT *, ABS(Amount) AS Amt, SUM(ABS(Amount)) OVER(PARTITION BY Customer, TransactionType ORDER BY Date ROWS...
August 12, 2016 at 2:48 pm
drew.allen (8/11/2016)
;
WITH totals AS (
SELECT *, ABS(Amount) AS Amt, SUM(ABS(Amount)) OVER(PARTITION BY Customer, TransactionType ORDER BY Date ROWS UNBOUNDED PRECEDING...
August 12, 2016 at 2:09 pm
jssashank (8/11/2016)
J Livingston SQL (8/11/2016)
--code based on ChrisM fine work at http://www.sqlservercentral.com/Forums/Topic1731617-391-1.aspx
CREATE TABLE #t1
(TransactionID INT,
Customer INT,
...
August 12, 2016 at 2:07 pm
Viewing 15 posts - 1 through 15 (of 26 total)