How To Send Batch SQL Statements to Oracle (271494)



The information in this article applies to:

  • Microsoft Data Access Components 1.5, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.0, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.1, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.1 (GA), when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.1 SP1, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.1 SP2, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.5, when used with:
    • the hardware: Intel x86
  • Microsoft Data Access Components 2.6, when used with:
    • the hardware: Intel x86

This article was previously published under Q271494

SUMMARY

It is possible to create a batch of SQL statements that run on Microsoft SQL Server by separating each SQL statement with a semicolon (;). You can achieve similar results when you run Oracle with either the OLE-DB Oracle Provider or Oracle driver (provided with the Microsoft Visual Database Tools) if you create an Oracle Block Structure with the BEGIN and END statements.

MORE INFORMATION

Following is sample code that illustrates the use of BEGIN and END:
// Tables Definition
create table table1 (fname varchar2(20), lname varchar2(30))

//INSERTS
begin insert into table1 values ('John', 'Doe'); Insert into table1 values ('Mary', 'Doe'); end;
				

REFERENCES

For more information, see the SQL Books Online "Specifying Batches" topic.

Modification Type:MinorLast Reviewed:7/13/2004
Keywords:kbhowto KB271494