BTEQ DELETE STATEMENT Successfull - nothing deleted in table

Tools
N/A

BTEQ DELETE STATEMENT Successfull - nothing deleted in table

Hi...

Quite new to BTEQ - but 5 years experience in SQL assistant.

Question is if there are default restrictions to "write" from BTEQ into a DB-table.

Now, in BTEQ I'm succesfull to logon and run the SQL...

Teradata BTEQ 14.00.00.07 for WIN32. Enter your logon or BTEQ command:
.logon TD_KEITH/MINGELS
.logon TD_KEITH/MINGELS
Password:
********

 *** Logon successfully completed.
 *** Teradata Database Release is 14.00.07.16                  
 *** Teradata Database Version is 14.00.07.15                    
 *** Transaction Semantics are ANSI.
 *** Session Character Set Name is 'ASCII'.
 
 *** Total elapsed time was 1 second.
 
 BTEQ -- Enter your SQL request or BTEQ command:
DEL FROM t02_opdm.test_bu
;
DEL FROM t02_opdm.test_bu
;

 *** Delete completed. 6 rows removed.
 *** Total elapsed time was 1 second.

 BTEQ -- Enter your SQL request or BTEQ command:
.logoff

Afterwards I looked in the resultset of the table via SQL Assistant and the data is still there!?

What is going wrong??

(Running a procedure gives the same result (of course))

Thanks in advance...

Pauly

Tags (2)
2 REPLIES
N/A

Re: BTEQ DELETE STATEMENT Successfull - nothing deleted in table

You logged on using an ANSI session (your system default) and didn't COMMIT before the LOGOFF -> DELETE is rolled back.

Your connection from SQL Assistant is probably explicitly set to a Teradata mode session, where each request is a single transaction by default. 

So either do a .SET SESSION TRANSACTION BTET; before the logon or start using COMMIT;

N/A

Re: BTEQ DELETE STATEMENT Successfull - nothing deleted in table

Wow...

Thanks for the prompt reply!!

It's working now...

Thanks Dieter