Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Row max value

Status
Not open for further replies.

mastercontrol

Programmer
Apr 19, 2011
8
0
0
CH
Hi,

I need to get max value of all rows + value of next row

Example:

w1 w2 w3 w4 w5
1 2 3 4 5

Max Value = 5
+ value from max Value + next row = 6

So, should show value of 6.
 
Declare a new function

Long ll_value

SELECT Max(col_name)
INTO :ll_value
FROM tab_name;

Return ll_value + 1


Regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top