![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Is there any way of creating temporary tables (in memory) using PL/SQL (Oracle 9i)? Then update values in those rows from those in-memory temp tables for re-insertion into schema tables? |
|
On a particular schema, I don't have CREATE TABLE (to make my own temp tables using CTSA) or ALTER TABLE (to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on the tables I need to manipulate. |
|
I need to delete records from various child tables (enabling me to update a record in a parent table), first copying those records to memory so I don't lose them. Then I need to update a value in those records and re-insert them into schema tables. Is there some simple way to do this in PL/SQL that I'm missing? One way to do it would be to open a cursor(s), write INSERT records (with a few values updated, being reflected in the INSERT statements), to a text file and run that separately. Seems like a lousy way to do it though. |
|
Any other suggestions? |
#3
| ||||
| ||||
|
|
Is there any way of creating temporary tables (in memory) using PL/SQL (Oracle 9i)? Then update values in those rows from those in-memory temp tables for re-insertion into schema tables? |
|
On a particular schema, I don't have CREATE TABLE (to make my own temp tables using CTSA) or ALTER TABLE (to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on the tables I need to manipulate. |
|
I need to delete records from various child tables (enabling me to update a record in a parent table), first copying those records to memory so I don't lose them. Then I need to update a value in those records and re-insert them into schema tables. Is there some simple way to do this in PL/SQL that I'm missing? One way to do it would be to open a cursor(s), write INSERT records (with a few values updated, being reflected in the INSERT statements), to a text file and run that separately. Seems like a lousy way to do it though. |
|
Any other suggestions? |
#4
| ||||
| ||||
|
|
Is there any way of creating temporary tables (in memory) using PL/SQL (Oracle 9i)? Then update values in those rows from those in-memory temp tables for re-insertion into schema tables? |
|
On a particular schema, I don't have CREATE TABLE (to make my own temp tables using CTSA) or ALTER TABLE (to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on the tables I need to manipulate. |
|
I need to delete records from various child tables (enabling me to update a record in a parent table), first copying those records to memory so I don't lose them. Then I need to update a value in those records and re-insert them into schema tables. Is there some simple way to do this in PL/SQL that I'm missing? One way to do it would be to open a cursor(s), write INSERT records (with a few values updated, being reflected in the INSERT statements), to a text file and run that separately. Seems like a lousy way to do it though. |
|
Any other suggestions? |
#5
| ||||
| ||||
|
|
Is there any way of creating temporary tables (in memory) using PL/SQL (Oracle 9i)? Then update values in those rows from those in-memory temp tables for re-insertion into schema tables? |
|
On a particular schema, I don't have CREATE TABLE (to make my own temp tables using CTSA) or ALTER TABLE (to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on the tables I need to manipulate. |
|
I need to delete records from various child tables (enabling me to update a record in a parent table), first copying those records to memory so I don't lose them. Then I need to update a value in those records and re-insert them into schema tables. Is there some simple way to do this in PL/SQL that I'm missing? One way to do it would be to open a cursor(s), write INSERT records (with a few values updated, being reflected in the INSERT statements), to a text file and run that separately. Seems like a lousy way to do it though. |
|
Any other suggestions? |
#6
| |||
| |||
|
|
If you really want temptables, have the DBAcreatesome for you. The second question is written poorly. Why would you want to update the temp rows? ("those rows") |
|
On a particular schema, I don't haveCREATETABLE(to make my own temp tablesusingCTSA) or ALTERTABLE(to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on thetablesI need to manipulate. If you want TEMPtableshave the DBAcreatethem. Talk to your DBA about GLOBALTEMPORARYTABLES. Then you don't needCREATETABLE privilege. I need to delete records from various childtables(enabling me to update a record in a parenttable), first copying those records to memoryso I don't lose them. Then I need to update a value in those records and re-insert them into schematables. Well if you cannot get the DBA's help, then what aboutusingaPL/SQLtables? |
#7
| |||
| |||
|
|
If you really want temptables, have the DBAcreatesome for you. The second question is written poorly. Why would you want to update the temp rows? ("those rows") |
|
On a particular schema, I don't haveCREATETABLE(to make my own temp tablesusingCTSA) or ALTERTABLE(to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on thetablesI need to manipulate. If you want TEMPtableshave the DBAcreatethem. Talk to your DBA about GLOBALTEMPORARYTABLES. Then you don't needCREATETABLE privilege. I need to delete records from various childtables(enabling me to update a record in a parenttable), first copying those records to memoryso I don't lose them. Then I need to update a value in those records and re-insert them into schematables. Well if you cannot get the DBA's help, then what aboutusingaPL/SQLtables? |
#8
| |||
| |||
|
|
If you really want temptables, have the DBAcreatesome for you. The second question is written poorly. Why would you want to update the temp rows? ("those rows") |
|
On a particular schema, I don't haveCREATETABLE(to make my own temp tablesusingCTSA) or ALTERTABLE(to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on thetablesI need to manipulate. If you want TEMPtableshave the DBAcreatethem. Talk to your DBA about GLOBALTEMPORARYTABLES. Then you don't needCREATETABLE privilege. I need to delete records from various childtables(enabling me to update a record in a parenttable), first copying those records to memoryso I don't lose them. Then I need to update a value in those records and re-insert them into schematables. Well if you cannot get the DBA's help, then what aboutusingaPL/SQLtables? |
#9
| |||
| |||
|
|
If you really want temptables, have the DBAcreatesome for you. The second question is written poorly. Why would you want to update the temp rows? ("those rows") |
|
On a particular schema, I don't haveCREATETABLE(to make my own temp tablesusingCTSA) or ALTERTABLE(to temporarily disable referential integrity constraints) system privileges. I do have SELECT, INSERT, UPDATE, and DELETE object privileges on thetablesI need to manipulate. If you want TEMPtableshave the DBAcreatethem. Talk to your DBA about GLOBALTEMPORARYTABLES. Then you don't needCREATETABLE privilege. I need to delete records from various childtables(enabling me to update a record in a parenttable), first copying those records to memoryso I don't lose them. Then I need to update a value in those records and re-insert them into schematables. Well if you cannot get the DBA's help, then what aboutusingaPL/SQLtables? |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |