Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Locking Within Stored Procedure - response (1) by dnoeth

$
0
0

I don't know why it doesn't work as expected, but you should check if t's possible to change your code to get rid of the BT/ET: 
BEGIN REQUEST;
SELECT col2 FROM table1 WHERE col1 = 1;
UPDATE table1 SET col3 = 5 WHERE col1 = 1 ;
END REQUEST;
Now it's a MultiStatement Request, which results in 1 instead of 4 messages sent to Teradata. I'm not shure if you still need the LOCK ROW EXCLUSIVE, i think there's some internal lock when the row is modified which prevents access.
 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>