View previous topic :: View next topic
|
Author |
Message |
arijitlovesall
New User
Joined: 07 Jul 2009 Posts: 2 Location: Chennai
|
|
|
|
I came across a query like this :
SELECT VALUE(SUM(COL1),0)
INTO :WS-VAR1
.........................
Can anyone let me know what the VALUE(SUM(COL1),0) clause does actually.
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you try the query in spufi (without the host variable). . . |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
or look up value() in the manual.
It does the same as coalesce()
One thing to keep in mind is that "select sum() from tab where ..." returns null when no rows qualify the where clause |
|
Back to top |
|
|
|