On Fri, Jun 28, 2013 at 1:16 PM, Kenneth Tilton wrote:
> We want to make sure no two examiners are working on the same case at the
> same time, where the cases are found by searching on certain criteria with
> limit 1 to get the "next case".
>
I've been using this pattern for about 14 years with
Kenneth Tilton wrote:
> We want to make sure no two examiners are working on the same case at
> the same time, where the
> cases are found by searching on certain criteria with limit 1 to get the
> "next case".
>
> A naive approach would be (in a stored procedure):
>
>
Le vendredi 28 juin 2013 à 13:18 -0400, Kenneth Tilton a écrit :
>
> On Fri, Jun 28, 2013 at 1:16 PM, Kenneth Tilton
> wrote:
> We want to make sure no two examiners are working on the same
> case at the same time, where the cases are found by searching
> on certain crite
Sorry, big typo below:
On Fri, Jun 28, 2013 at 1:16 PM, Kenneth Tilton wrote:
> We want to make sure no two examiners are working on the same case at the
> same time, where the cases are found by searching on certain criteria with
> limit 1 to get the "next case".
>
> A naive approach would be
We want to make sure no two examiners are working on the same case at the
same time, where the cases are found by searching on certain criteria with
limit 1 to get the "next case".
A naive approach would be (in a stored procedure):
next_case_id := null;
select id into next_case_id
from c