Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Statement Request

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Has anyone succesfully submitted a multi-statement request (all inserts) through ODBC? I've gotten several different answers from NCR consultants on this. Any experiences would be helpful.
Thanks
 
A multi-statement request is done by putting the semi-colon on the same line as the next statement. In other words, the next statement must appear after the semi-colon and on the same line. The multi-statement is a Unit-of-Work, meaning that it all completes or it all rollbacks. So be carefull, if the last statement abends, then the entire request will rollback.
 
If you are working with queryman, you could process statements in the query window as multi-statements by pressing the "double-feet" button: it will execute your request in parallel.
 
Yes.

QMan uses ODBC.
As stated previously in this thread, (but clarified here with example), finish the first statement with a ';' on the next line immediately followed by the second statement, for example...

sel count(*) from tableA
; sel count(*) from tableB
; sel count(*) from tableC
;

You can use either the 'two feet' or 'four feet' buttons - execute and execute parallel, respectively to process.

If you want an explicit transaction, you could do the following:

BT
;sel count(*) from tableA
; sel count(*) from tableB
; sel count(*) from tableC
;ET
;

Regards
RanD
(Randy Volters, certified Teradata Master
email: randvol0826@aol.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top