The following describes how to use SQL to query consecutive code segments in your database. If you are interested in SQL queries, you may wish to take a look. There is a table structure, fphm, kshm2014, 00000001hz00022014, 00000003hz00042014, 00000005hz00072014, 0000
The following describes how to use SQL to query consecutive code segments in your database. If you are interested in SQL queries, you may wish to take a look. There is a table structure, fphm, kshm team
The following describes how to use SQL to query consecutive code segments in your database. If you are interested in SQL queries, you may wish to take a look.
There is a table structure,
Fphm, kshm
Int32 00000001
Int32 00000002
Int32 00000003
Int32 00000004
Int32 00000005
Int32 00000007
Int32 00000008
Int32 00000009
Maid
Maid
Maid
Maid
Maid
(The second field may contain continuous data and may contain breakpoints .)
SQL> SELECT B. fphm, MIN (B. kshm) Start_HM, MAX (B. kshm) End_HM 2 FROM (SELECT. *, TO_NUMBER (. kshm-ROWNUM) cc 3 FROM (SELECT * 4 FROM t 5 order by fphm, kshm) a) B 6 group by B. fphm, B. cc 7/FPHM START_HM END_HM ---------- -------- 2013 00000120 00000122 2013 00000124 00000125 2014 00000001 00000005 2014 00000007 00000009 query result:
Int32 00000001, 00000005
00000007
Maid, 00000122
00000125