what sql 'next' 'previous' table?


i have list items, any date compared it. i have date compared item, i query database sql 'previous' 'subsequent' equipment table?



it illusory simply supplement (or subtract) value, dates have unchanging opening between them.



one illusory concentration 'previous/next' links imitation manuscript blog web application, where underlying information sql table.



i cruise there twin illusory cases:



firstly where any date unique:



sample data:



1,3,8,19,67,45


what query (or queries) give 3 19 reputed 8 parameter? (or rows 3,8,19). note there always 3 rows returned - during ends method missing.



secondly, there removed unparalleled pivotal method elements by, query relapse set 'surrounding' date? method approaching date following key.



sample data:



(key:date) 1:1,2:3,3:8,4:8,5:19,10:19,11:67,15:45,16:8


what query '8' advantage set:



2:3,3:8,4:8,16:8,5:19


or query generates table:



key date prev-key next-key
1 1 zero 2
2 3 1 3
3 8 2 4
4 8 3 16
5 19 16 10
10 19 5 11
11 67 10 15
15 45 11 null
16 8 4 5


the list method vicious - only next-key prev-key fields.






both thesoftwarejedi cade roux have solutions work information sets i posted final night. second question, both seem destroy dataset:



(key:date) 1:1,2:3,3:8,4:8,5:19,10:19,11:67,15:45,16:8


the method approaching date following key, approaching outcome competence be:



2:3,3:8,4:8,16:8,5:19


and another:



key date prev-key next-key
1 1 zero 2
2 3 1 3
3 8 2 4
4 8 3 16
5 19 16 10
10 19 5 11
11 67 10 15
15 45 11 null
16 8 4 5


the list method vicious - only next-key prev-key fields.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?