Recent

Author Topic: Position to records in Firebird database  (Read 3297 times)

finalist

  • Jr. Member
  • **
  • Posts: 84
Position to records in Firebird database
« on: November 04, 2009, 07:20:49 pm »
For example: there are 100 records in a Firebird database.
I do execute the SQLQuery: 'select W from TRIANGLE order by W asc'
I need to position to 50 and 51 record and get the average value of both
But the record count may to be 2, 3, 4 ....
Is there some solution for this ?
Thank you !

bluewolf

  • New Member
  • *
  • Posts: 24
Re: Position to records in Firebird database
« Reply #1 on: November 04, 2009, 09:55:22 pm »
Hi finalist,

I had to check on the internet as I don't use Firebird.

You shoud try with: 'select first 2 skip 49 W from TRIANGLE order by W asc'

According to firebird documentation here it should work.
You can check the link. There are several examples about it.

I hope it helps.

Regards.
Alberto.


Alberto

finalist

  • Jr. Member
  • **
  • Posts: 84
Re: Position to records in Firebird database
« Reply #2 on: November 04, 2009, 10:04:52 pm »
Thanks bluewolf !
Your solution works fine for me !
 :)
« Last Edit: November 05, 2009, 10:19:21 am by finalist »