If the timestamps are unique you could try including a subquery which
gets the next lowest date
eg. (not sure if this is valid SQL syntax, I'm not meant to be on the PC
:) Select data, datetimefield, (select top 1 datetimefield from table1
where datetimefield < A.datetimefield order by datetimefield desc) as
prevdatetime from table1 as A order by datetimefield
then you can use the previous date/time to calc whether to show the
date/time for not
On 12/01/2014 1:06 PM, Atul Chowdhury wrote:
No, I'm afraid not. What's your final output? If its a report, you
may want to consider a reporting tool ( Jasper/BIRT/etc ) to satisfy
this requirement.
On Sat, Jan 11, 2014 at 8:49 AM, Cecil Westerhof
<cldwester...@gmail.com <mailto:cldwester...@gmail.com>> wrote:
2014/1/11 Atul Chowdhury <atulsmail...@gmail.com
<mailto:atulsmail...@gmail.com>>
You're probably after something like the BREAK directive found
in SQL*Plus.
See:
http://docs.oracle.com/cd/A84870_01/doc/sqlplus.816/a75664/ch42.htm
SQL> BREAK ON DEPTNO
SQL> SELECT DEPTNO, ENAME, SAL
2 FROM EMP
3 WHERE SAL < 2500
4 ORDER BY DEPTNO;
SQL*Plus displays the following output:
DEPTNO ENAME SAL
---------- ----------- ---------
10 CLARK 2450
MILLER 1300
20 SMITH 800
ADAMS 1100
30 ALLEN 1600
JAMES 950
TURNER 1500
WARD 1250
MARTIN 1250
Yes, that is exactly what I want. This is not possible in H2?
--
Cecil Westerhof
--
You received this message because you are subscribed to the Google
Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to h2-database+unsubscr...@googlegroups.com
<mailto:h2-database%2bunsubscr...@googlegroups.com>.
To post to this group, send email to h2-database@googlegroups.com
<mailto:h2-database@googlegroups.com>.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google
Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.