You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br> on 2003/03/21 13:24:46 UTC

Complex query

Hi!

Let's take a Products table with 20 fields, and about 500.000 or more
records.


1st. Query:

Using a SQL client I have used this query to navigate among records in a
products table. Each time I issue SELECT, I get next record. I can't use
recordset to navigate because a lot of changes in records (I really need to
be up-to-date):

select * from products where product.id = (select min(product.id) where
product.id > ? )

in place of ? I put old product Id. Someone knows how can I implement this
type of query using ODMG?

2nd. Query:

How can I get a list of primary keys, so I can use them to navigate between
records? Something like

select product.id from products


Thanks for any help,

Edson Richter



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/3/2003