on 2010 Nov 16 4:05 PM
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
BEGIN 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;
END;
The File is only for testing
1
2
3
4
ASA Version is 11.0.1.2506
The Documentation http://dcx.sybase.com/index.html#1101en/dbreference_en11/load-table-statement.html*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 ?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
62 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.