The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

I try to load data of a client file into a local temporary table. I try to put all my procedure/function code if possible in an ATOMIC Block. The sample below works without the ATOMIC

    declare local temporary table tmpRSTDOMAIN 
          ( RSTDOMAIN_KDNR integer null ) ON COMMIT PRESERVE ROWS;
    load table tmpRSTDOMAIN( RSTDOMAIN_KDNR ) 
          using client file 'c:\\loadTableTest.csv' 
          delimited   by ';' defaults on;
    select * from tmpRSTDOMAIN;

The File is only for testing


ASA Version is

The Documentation*d5e42427 states that under Remarks that

For base tables and global temporary tables, a commit is performed. For local temporary tables, a commit is not performed

Do not use the LOAD TABLE statement on a temporary table for which ON COMMIT DELETE ROWS was specified, either explicitly or by default, at creation time. However, you can use LOAD TABLE if ON COMMIT PRESERVE ROWS or NOT TRANSACTIONAL was specified.

I get an ERROR that no commit/rollback is allowed inside a atomic statement. SQLCODE -267

Any ideas ? Documentation flaw ?

asked 16 Nov '10, 16:05

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
accept rate: 16%

This is a documentation error. LOAD TABLE causes a commit when loading into a temporary table as of the fix for QTS 454858. I will inform the doc team.

permanent link

answered 16 Nov '10, 16:47

Bruce%20Hay's gravatar image

Bruce Hay
accept rate: 48%

edited 16 Nov '10, 16:58

Volker%20Barth's gravatar image

Volker Barth

@Bruce: I had suspected an interference with a CHECKPOINT as done by LOAD TABLE. Is a CHECKPOINT valid inside an ATOMIC block? (According to the docs, it seems so - at least I haven't found a contrary statement.)

(16 Nov '10, 17:00) Volker Barth

I don't think there is a restriction against checkpoints within atomic blocks; however, statements such as LOAD TABLE and ALTER TABLE that cause checkpoints as side effects also cause commits.

(16 Nov '10, 18:33) Bruce Hay
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Nov '10, 16:05

question was seen: 820 times

last updated: 16 Nov '10, 16:58