Re: concurrency problem with lists ("check constraint" on groups of rows)



Hi!
The purpose is to store lists so I later can make easy sql-exists
consctructs:
select * from T t where exists (select null from myGroupMember p where
p.id=t.id and p.myGroupID=@myGroupID)

The table myGroupMember will become as small as possible, since a list
only will be stored once.
The lists comes from user input, so I don't know them before.

The code above gives oppurtunity to make a FK's on myGroupID in other
tables!
=> analysis of which rows (in a new table A) uses the same group
become trivial!

And there is a reason for setting the isolation level: try to comment
out the lines with "SET..."
Both session complete returning different id's :-( Next time you run
call to proc with same input param it will result in
something like this: More than 1 myGroupID 121000,2000,3000,4000,5009,

Hope its now more clear what I want to achieve ;-)
Best regards
Bjorn
.