>> Who's we? <<
People who wrote the SQL Standards and/or have over 25 years with
RDBMS
My point about the paper file system model is that you do not have
enough decades in IT to recognize what you are mimicking. You don't
understand why RDBMS replaced file system or why file systems repalced
paper system.
>> If you read the message all of these questions are answered in the original post. <<
Let's go back to the original spec and look at it word for word.
>> However, having selected these rows I don't want _any_ other user to get them, <<
SELECT is a concept in RDBMS so it is loaded with lots of meaning. It
does not imply any kind of change to the data nor any locking. You
also never said how each user does this SELECT, or how to handle
overlaps.
>> ... and I'm not able to delete them until the requesting client has finished using them, but even then I simply want to mark their state as 'complete'. <<
How do these other users use these rows? What action makes the status
change to "complete" and what does that have to do with deletion? If
you had read Codd, you might remember the Information Principle; all
information is modeled as scalar values in columns in rows of tables.
Ergo, your user needs to update the "<something>_status" values or the
system has to do this based on some rules (i.e. predicates).
I don't think you understand that a status is a state of being over
time, so you confuse the two.
>> Obviously I need some sort of state flag [sic: needs to be a "<something>_status" data element; flags are binary and belong in assembly language not SQL] within the procedure, but what about concurrent access issues. <<
This is why I brought up optimistic currency and tried to explain it
to you, since you do not have a background in RDBMS. It let multiple
users share the DB without the overhead of locks. I cannot post that
much education in a newsgroup, but Google it.
>> What option? Your statement makes no reference to any explicit option, it only hints at other models. <<
Well, I looked at your DDL and vague specs and did the best I could.
Oh, you never posted DDL or clear specs.
If these subsets were picked with a predicate, then we might be able
to use updatable VIEWs that have a WITH CHECK OPTION to guarantee that
each user has a disjoint subset.
>> With all due respect if you're trying to impress me with your knowledge of Xerox history I'm not impressed nor interested, only saddened at the waste of bandwidth, time and effort. <<
A professional would want to learn about his culture and the history
of the technology.
"Against stupidity the gods themselves struggle in vain." - Die
Jungfrau von Orleans; Friedrich von Schiller (1759-1805)
Would you like to post better specs and perhaps some DDL, so we can
come up with code? Would you actually learn how to do things right
and not just be a cowboy coder?
>> Stay informed about: Returning a 'uniquely unique' set of rows.