Re: cluster index
Posted in 1996
> I've got a table, create cluster index on some columns
> then declare cursor and browse table with fetch next
> and everything is ok, i can see my data in proper order.
>
> Next I add some rows and when i browse new rows are
> at end. I cannot set order declaring cursor because it's
> for update.
>
> I use Informix SE 5.0 on ICL.
>
> Can anybody help ?
Not really. This is as per the definition of a cluster index in TFM.
Perhaps a better way to do it is (roughly) as follows:
DECLARE fetch_rows CURSOR FOR
SELECT ....
...
ORDER BY ....
DECLARE lock_row CURSOR FOR
SELECT ...
WHERE key = ...
FOR UPDATE
FOREACH fetch_rows INTO ...
OPEN lock_row
FETCH lock_row
UPDATE ...
END FOREACH
HTH.
--
Ciao,
Billy
+------------------------------------------------------------------------------+
| I used to be indecisive, but now I'm not so sure... |
+------------------------------------------------------------------------------+