Lock [message #57106] |
Tue, 20 May 2003 22:29 |
Narren
Messages: 3 Registered: May 2003
|
Junior Member |
|
|
i have "table A", whenever i insert records in
"table A" similar record will be inserted into "table B" (Insert trigger in table A)
One of our process does ,
Insert into table c
Select (some calculations) from table B
then ,
delete from table B
I'm not sure when table A will be loaded.
It can be loaded anytime (means table B too)..
But our process starts at 10AM everyday, so it fetches from table B arround 10AM, If during that time table B is getting loaded , then it takes only records loaded at that time. How to make my select statement to wait until all records get loaded into table B ?
|
|
|
|
Re: Lock [message #57114 is a reply to message #57111] |
Wed, 21 May 2003 08:26 |
Narren
Messages: 3 Registered: May 2003
|
Junior Member |
|
|
Load process is done by someother group, so we cant
change their process.Its impossible.
Our process starts when we start pulling data from
"table B". I can alter the process from this point only.
Is that possible to check whether is there any lock in
table and then start fetching data.
For eg ,
If <ANY LOCK IN TABLE B > then
Wait < DONT FETCH>
Else
<LOCK TABLE B, SO THAT NO NEW RECORDS ARE INSERTED>
Select from "table B"
<DO MY PROCESS>
Delete from "table B"
END
|
|
|
Sorry Re: Lock [message #57115 is a reply to message #57111] |
Wed, 21 May 2003 08:29 |
Narren
Messages: 3 Registered: May 2003
|
Junior Member |
|
|
I used < > in my message so it got messed...
Load process is done by someother group, so we cant
change their process.Its impossible.
Our process starts when we start pulling data from
"table B". I can alter the process from this point only.
Is that possible to check whether is there any lock in
table and then start fetching data.
For eg ,
If [[ ANY LOCK IN TABLE B ]] then
Wait [[ DONT FETCH ]]
Else
[[ LOCK TABLE B , SO THAT NO NEW RECORDS ARE INSERTED ]]
Select from "table B"
Delete from "table B"
End
|
|
|