Hi,

I have a table 'A'. It has fields (tablename, group, performed).

This table has 10000 rows. To begin with, 'perfmomed' field is null for all the records. Typical group values are 001, 002, 003,.... 050. Every group has the same set of tables.

I need to update 60 rows of this table every day and change the performed field's value to true. The trick is I need to update the records in group order not table order or not randomly. Meaning on first day I need to change 60 records from group 001 and next day, if there any records remaing in 001 and records from grop 002 etc...

I issue :

update A set PERFORMED = 'TRUE'
where PERFORMED is null
and rownum < 61 ;

This works fine, except, the 60 records are picked in random not by group.

So I changed the query to

update A set PERFORMED = 'TRUE'
where PERFORMED is null
and rownum < 61
order by group, tablename ;

This statement gives error PLS-00103

Can any only tell me how I can achive the update in a sequecnce instead of randomly.

Can any one give me a hint how to solve this...

Thanks,
-Football