get the nearest highest value from a list oracle sql -


i have column in database in following format: yymmddhh24miss

sample data: 140203101241 140202101141 140102101240 143001101244 142801101245 142701131347 142601121542 142101131744 ... 

i need nearest high value list. ex: if pass 142701131333, should return 142701131347 above list.

any appreciated!

select data (    select data    tbl    data > '142701131333'    order data ) rownum = 1 

Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -