![]() |
|
Archives of the TeradataForumMessage Posted: Mon, 10 Mar 2008 @ 23:15:23 GMT
just use CASE:
,CASE WHEN amt IS NULL THEN 0 ELSE
SUM(amt) OVER (PARTITION BY s.customer_id
ORDER BY s.transid ASC
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
END
Dieter
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||