Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 26 Jul 2011 @ 11:03:03 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Update and commit
From:   Dieter Noeth

You run your SP probably in Teradata session mode where each request is a single transaction by default.

You need to submit a "BEGIN TRANSACTION" followed by a "LOCK TABLE tableex WRITE" before looping through the cursor.

And don't forget a final END TRANSACTION and appropriate error handling...

But the main question is: Why do you need a cursor at all?

You can probably write all the cursor logic in a single SQL statement.

There are some good articles on that topic on the DevEx: developer.teradata.com/...


  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023