![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello group I have a large table indexed by a varchar column I would like to select records that are around the hit value, say "Marriot" by index order How can I retrieve the prior and next in order? Is there a goto "Marriot" and then a goto +1 and goto -1 SQL facility? |
#3
| |||
| |||
|
|
Hello group I have a large table indexed by a varchar column I would like to select records that are around the hit value, say "Marriot" by index order How can I retrieve the prior and next in order? Is there a goto "Marriot" and then a goto +1 and goto -1 SQL facility? |
#4
| |||
| |||
|
|
Can OFFSET be a negative number? What I was looking for is a way to access the +1 and -1 record with SQL as seen on the screen when you do a select using an index or a sort. With PgAdmin when you see a record of interest in the middle of the display, you can visually see the one above and below. I seem to remember that in Informix I had a go + or - inside a pointer loop. Depending on your use-case you might be able to select the current and |
#5
| |||
| |||
|
|
What I was looking for is a way to access the +1 and -1 record with SQL as*seen on the screen when you do a select using an index or a sort. With PgAdmin*whenyou *see a record of interest in the middle of the display, you can visually see the one above and below. I seem to remember that in Informix*I had a go + or - *inside a pointer loop. Depending on your use-case you might be able to select the current and surrounding recordslike this: |
![]() |
| Thread Tools | |
| Display Modes | |
| |