I figured it out, maybe is not the most elegant way but it work for my case where only small sets are retrieved

create table foo2 (pk int, valor numeric(12,2), porce numeric(5,2));

insert into foo2 values (1,7893.45,0.4);
insert into foo2 values (5,7893.45,0.3);
insert into foo2 values (9,7893.45,0.3);

select *,
(select count(*) from foo2 as f2
where f2.oid <= foo2.oid) as counter
from  foo2;


-- Sinceramente, Josu� Maldonado.

... "Un cient�fico es un hombre tan endeble y humano como cualquiera; sin embargo, la b�squeda cient�fica puede ennoblecerle, incluso en contra de su voluntad." -- Isaac Asimov

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to