Something like this. Notice that I have more than one WHEN clause...In
my complete group command I have at least 5 lines of WHEN´S...
SELECT table1.loanumber, 'CUOTA' =
CASE
WHEN sum(table1.amount) is null then 0
WHEN sum(table1.amount) > 0 then table1.amount
ELSE ..anything else....
END
FROM table1
where table1.amount > 0
having CUOTA >0
GO
thanks
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only