Home » SQL & PL/SQL » SQL & PL/SQL » Min date value in the future, how can I do it??
Min date value in the future, how can I do it?? [message #211808] Tue, 02 January 2007 06:44 Go to next message
karrisql.com
Messages: 7
Registered: November 2006
Junior Member
I need to select row where date value is next in to
future. There might be multible value in future
but I need only next one.

col1, col2, col3, date-value
102 200 151 1.1.2007
100 195 160 1.2.2007
103 201 140 1.3.2007
108 140 171 2.3.2007

Now I need that kind of select statemen which returns
in this case:

100 195 160 1.2.2007

BR K
Re: Min date value in the future, how can I do it?? [message #211811 is a reply to message #211808] Tue, 02 January 2007 07:01 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
select * from table
 where date_value = (select min(date_value) from table
                      where date_value > sysdate);
By
Vamsi
Previous Topic: Retrieving data
Next Topic: sql*plus commands
Goto Forum:
  


Current Time: Mon Dec 05 08:40:19 CST 2016

Total time taken to generate the page: 0.17158 seconds