Monday, 4 April 2016

Re: [firebird-support] How to add previous column value to current value?

 

Try this:

select t.name, t.data, coalesce(t.data -(select data from t1 d where d.id = t.id -1),0) from t1 t

--
regards,
Michał Kurczabiński

__._,_.___

Posted by: Michal Kurczabinski <michkurc@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? The Yahoo Mail app is fast, beautiful and intuitive. Try it today!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.

__,_._,___

No comments:

Post a Comment