Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL for NOT_LOCKED?
Thanks Mark,
This is exactly the kind of work-around I was hoping to hear about if there isn't something like a NOT_LOCKED pseudocolumn I can query on.
Since the result-set from the query will start out returning hundreds of thousands of records, I'm assuming I don't even want a cursor to be that size. If I know I've got no more than ten users, then I could always just limit the query/cursor to a low rowcount because there can only be ten locked records in existence at any one time. If I had a rowcount < 20, then there would always be a record available for editing in the result set.
Is this flawed logic?
> in pl/sql I would open a cursor on all rows that meet the
> query criteria and then loop through the result set.
>
> I would perform a select for update with the nowait option on each row
> from the driving cursor. If I get the row I update it and advance to
> the next row. On error (locked condition with immediate return from
> nowait) I just advance to the next row.
>
> If coding like this in Delphi is not an option then perhaps you could
> write a database stored procedure (or package) and call the package
> from your application.
Sent via Deja.com
http://www.deja.com/
Received on Thu Jan 25 2001 - 14:20:08 CST
![]() |
![]() |