- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Does anyone has any script to load oracle data...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 01:19 PM
тАО07-11-2002 01:19 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2002 08:11 PM
тАО07-11-2002 08:11 PM
SolutionBrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 05:39 AM
тАО07-12-2002 05:39 AM
Re: Does anyone has any script to load oracle data and do transcation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 06:29 AM
тАО07-12-2002 06:29 AM
Re: Does anyone has any script to load oracle data and do transcation
the error message comes back as the object is already been used... or complilation errors..
if I have to spread out the commit of the datachange say for every 10,000 , can you help me to edit the code?
using the for loop?
create PROCEDURE tester1 IS
numcount number:=0;
begin
while true loop
numcount:=numcount+1;
insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);
commit;
insert into employee2 values (numcount,'lkjljf','dlkjdeann',87970.80);
commit;
insert into employeer3 values (numcount,'lkjljf','dlkjdeann',87970.80);
commit;
insert into employee values (numcount, 'dkjl','dlakdjfelsdjfe',10000);
update employee1 set salary = salary + 900
where empid = numcount;
update employee2 set salary = salary + 10000
where empid = numcount;
update employeer3 set salary = salary + 5000
where empid = numcount;
update employee set lastname = 'dkvnlkdoije'
where empid = numcount;
commit;
end loop;
END;
/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 06:52 AM
тАО07-12-2002 06:52 AM
Re: Does anyone has any script to load oracle data and do transcation
different procedure ....I now have one for loading and one for update ...and I am not quite sure what queries that i can do? Can you please lend me some example? In addition to that, I have still trying to figure out how to do commit every 10,000 as suggested?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 08:53 AM
тАО07-12-2002 08:53 AM
Re: Does anyone has any script to load oracle data and do transcation
numcount := numcount+1
if numcount = 1000 then
commit;
numcount := 0;
endif;
For a select statement, I imagine most will be pretty quick, depending upon the size of your table. A basic one would be:
select field1, field2, field3
into var1, var2, var2
from employee
where empid = value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 01:54 PM
тАО07-12-2002 01:54 PM
Re: Does anyone has any script to load oracle data and do transcation
I added your suggestion, but it failed with thisSQL> execute tester1
BEGIN tester1; END;
*
ERROR at line 1:
ORA-00001: unique constraint (TEST1.PK_EMPLOYEE) violated
ORA-06512: at "TEST1.TESTER1", line 6
ORA-06512: at line 1
code:
create PROCEDURE tester1 IS
numcount number:=0;
begin
while true loop
numcount:=numcount+1;
insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);
insert into employee2 values (numcount,'lkjljf','dlkjdeann',87970.80);
insert into employeer3 values (numcount,'lkjljf','dlkjdeann',87970.80);
insert into employee values (numcount, 'dkjl','dlakdjfelsdjfe',10000);
if numcount = 10000 then
commit;
numcount:=0;
end if;
end loop;
END;
/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 02:07 PM
тАО07-12-2002 02:07 PM
Re: Does anyone has any script to load oracle data and do transcation
???
Can you help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2002 02:43 PM
тАО07-12-2002 02:43 PM
Re: Does anyone has any script to load oracle data and do transcation
To do this in a pl/sql statement, you need to add a varchar2 string in your variables and perform an "execute immediate".
Something like this:
declare
sqlstring varchar2(100);
intblname varchar2(40);
begin
intblname:='emp';
sqlstring:='truncate table '||intblname;
execute immediate sqlstring;
end;
/