Re: SQL Select question

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 24 Dec 2002 08:26:06 -0800
Message-ID: <336da121.0212240826.5e48ab85_at_posting.google.com>


"Rob Panosh" <rob_panosh_at_asdsoftware.com> wrote in message news:<3e0728c2$1_at_nntp01.splitrock.net>...
> Hello,
>
> The following select statement will select all rows from myTable for UPDATE
> and all other users will be blocked until I close the select statement.
>
> Select * from myTable FOR UPDATE WHERE rowstate = 'Posted'
>
> Now if any new rows are added with rowstate of 'Posted' no other users will
> be able to select them for update. Does anybody know how to get around
> this?
>
 

If rows are added after you run select for update statement, they are not locked.

> I essentally want the user to be able to lock a set of rows do some
> processing then update them, change rowstate to 'Processed' or is there
> anyway I can detect which rows are locked?
>

No, unless you try to lock them.

>
> Thanks,
> Rob Panosh
Received on Tue Dec 24 2002 - 17:26:06 CET

Original text of this message