i'm using ruby and sinatra and oci8 and i want to run an sql file which contain multiple sql statements but oci8 just can let me execute one statement
str="INSERT INTO AA(NAME) VALUES ('asasa')"
@conn1 = OCI8.new(DB_USER, DB_PASSWORD, DB_SERVER)
@conn1.exec(str)
for that i have to split all sql statements by using regex but i had a problem in that,i did'nt find a regex which let me do this. i want to split all statments
example of an sql file ;
create table users (name varchar2(20),age int);
begin
insert into users values('amine5',20);
insert into users values('amine5',30);
end;
the file can contain all sql statements