Oracle 10g - Delete 1000 Table?

Dec 21, 2007

I have 1000+ tables in a DISCOVER tablespace in 10g.

I need to drop ALL tables in this area and leave the tblsp intact so that I can IMP a data update from 9i (prod) into 10g (test).

Is there an easy cmd to drop all the tbls, or am I missing someway to do this in DB Console for 10g.

View 3 Replies


ADVERTISEMENT

SQL & PL/SQL :: Table With 1000 Columns

Jun 20, 2011

just wanted to know if i create a table with 1000 columns, and use only few of them and remaining are for future use, will it affect the performance and storage?

View 16 Replies View Related

SQL & PL/SQL :: Insert Data Into Another Table With FORALL Bulk Collect Limit 1000

Aug 21, 2011

Table contains 10k records,we are going to insert data into another table with FORALL bulk collect limit 1000. if i use 10000 ,it's completed fast compared to 1000 limit.Can u tell me which one is better Limit.

View 4 Replies View Related

SQL & PL/SQL :: Delete Redundant Table In Oracle?

Apr 23, 2012

Is there a SQL query to find out the redundant or unused table in Oracle.

Some tables shows no dependencies to itself or other schemas,but has got valid data in it, deleting it will affect the functionality of the system.

View 3 Replies View Related

Oracle 9i - Delete Data One By One From Particular Table

Oct 28, 2008

I need to create a stored procedure in Oracle 9i which will automatically delete data one by one from a particular table and then by means of same procedure insert record one by one in same table.

View 6 Replies View Related

PL/SQL :: To Delete Child Records Manually Without Using Oracle Delete Cascade

Oct 9, 2012

I have to write a procedure that accepts schema name, table name and column value as parameters....I knew that i need to use metadata to do that deleting manually.

View 9 Replies View Related

How To Delete Table Information In SQL Loader Log File Output In Oracle

Jan 19, 2011

I have a SQL Loader Log File Output. I would like to delete Table Information from the output file.Following is my code.

//PATH OPENED AS TEXT BY STREAM READER
System.IO.StreamReader strm = File.OpenText(batchFileName);
//OUTPUT

[Code]....

View 8 Replies View Related

PL/SQL :: Delete Or Empty Single Field Containing BLOB In Oracle Table?

Jul 8, 2012

I have a table in schema with a BLOB field. I store employee's picture in this field. Fields in this table are emp_id (number) emp_name (varchar2) and emp_photo (BLOB). I want to ask if there is a way in pl / sql that i could empty this BLOB field to null or reset this field so that user can change the saved photo graph and save another one.

what i am looking for is something like

alter table employee set emp_photo = empty_blob() or alter table employee set emp_photo = null

View 3 Replies View Related

SQL & PL/SQL :: Program To Update 1000 Rows

Sep 16, 2010

May I have a PL/SQL program that can update 1000 rows.

View 4 Replies View Related

SQL & PL/SQL :: Can't Exceed 1000 Expressions In Query

Nov 18, 2011

I am trying to run the following query below in Oracle:

Select Acct_Num, Customer_Name
From Database
Where Acct_Num IN (
1,
4,
104
..,
..,
192384,
200002
)

When I attempt to run the query, I get the error message: "ORA-01795 maximum number of expressions in a list is 1000"

Is there any way I can execute this query w/o having to break the 'IN' list up by 1,000 Acct_Num over numerous amount of times? I know the 50,000+ accounts I want the info on but they are not ordered and they mix ranges with accounts I don't want. Therefore I can't use a 'BETWEEN' clause. Also, I don't have the ability to create a temp table.

View 6 Replies View Related

SQL & PL/SQL :: BULK COLLECT And Employ LIMIT Of 1000 With FORALL

Oct 19, 2011

I have an app that reads records from a driver table in order to update another (account) table. The idea is that it runs quickly but does not impact other processes on the system. In total I have around 1M records to update.

Originally I wanted to BULK COLLECT and employ a LIMIT of 1000 with a FORALL. The problem with this approach though is that I make two updates. One to the target table but I also need to update the driver table showing that I have processed the record. Therefore I cannot use this option to commit every time I reach the LIMIT by having a COMMIT inside the LOOP.

So instead I I have a FOR LOOP and test the count, if it is 1000 then I want to commit. I thought this syntax would be fine but I get the 'Fetch Out of Sequence' error. Below is a copy of the code.. Is this being caused by the double update... as the format of the code looks correct to me (though it is late!!)?

PROCEDURE update_set IS
CURSOR cur_get_recs IS
SELECT account_num,
ttw_active_flag,
acct_rowid,
rowid driver_rowid
FROM driver_table
FOR UPDATE OF processed;
[code]...

View 5 Replies View Related

SQL & PL/SQL :: How To Commit After 1000 Records In Simple Insert Statement

Oct 10, 2011

I am using Oracle 11g Release 11.2.0.1.0

OS: windows

I am taking an example of EMP table in a scott schema.

EMP_1 is also a same structure of EMP.

Here is the Insert statement used.(i might get where clauses etc in the real scenario i am taking a simple example here)

INSERT INTO SCOTT.EMP_1(JOB,ENAME,EMPNO) SELECT JOB,ENAME,EMPNO FROM SCOTT.EMP

table EMP is having around 25 million records.

i would like to do a commit after every 1000 records. as my redo log is getting full if i use a single commit at the end.

Quote:pls note: Increasing of redo log is not possible as of now

is there anyway i can acheive this without cursor bulk collect.

View 7 Replies View Related

SQL & PL/SQL :: Updated Values For Column Starts With 1000 Onwards

Jun 9, 2010

I am having one table with 4 columns where some 1500 records are there. Now I created one new column with number data type and i want value to be updated for that column starts with 1000 onwards.

View 4 Replies View Related

Server Utilities :: Creating SQL Loader Ctl File With Over 1000 Columns?

Dec 3, 2010

Next week I will be getting an input file which will contain over 1000 data columns to be loaded into ORACLE. It's about 6,400 characters in length.

My question is...has ever created a huge ctl file like this to be used for SQLLoader, using so many columns? I will be sending certain columns(data) to certain tables, so it's not just going into 1. It will be about 6 tables.

View 39 Replies View Related

Reports & Discoverer :: Builder Get Closed - Formatting Page 1000

Dec 23, 2011

I've created report to generate letters,my query contains records more than 1000 while generating report it shows report progress

"Formatting Page 1000" after that report builder gets closed without any error message,I've tried for 10 records it is working fine,

View 5 Replies View Related

PL/SQL :: Error ORA-01795 - Maximum Number Of Expression In A List Is 1000

Jan 30, 2013

we are using database 11g.

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

i am getting one error while selecting the data from table.

SELECT interco_type, entity, chapter_entity, tran_currency, source_id_entity,
tran_id_entity, mirror_id, gaap_type, counterpart
FROM t_gri_reconid_dtl_agg_gcr;
or
select * from t_gri_reconid_dtl_agg_gcr where rownum = 1 ;

Error:- ORA-01795: maximum number of expression in a list is 1000 ( error is same in both the case )

View 13 Replies View Related

SQL & PL/SQL :: How To Delete Rows From Table

Oct 19, 2011

I am using the below proc to delete some records

1)select client_id,count(*) from TCLIENT_NOTIFICATION_PACK where client_id=1620560178 group by client_id order by 2 desc;

client_id count(*)
----------- ---------
16205601785128

2)select client_id, count(*) from TCLIENT_NOTIFICATION_PACK
where client_id=1620560178
group by client_id
having count(*) > 40
order by 2 desc
client_id count(*)
----------- ---------
16205601785128

3) select client_id,clnt_notification_pack_tid
-- bulk collect into v_client_id,v_notif_tid
from (select clnt_notification_pack_tid,
client_id,
clnt_notification_pack_typ_tid,
crte_dt,

[code]....

4) Iam using the below proc to delete the rows from table, except the 4 rows returned above

declare
v_clnt_notification_pack_tid TCLIENT_NOTIFICATION_PACK.CLNT_NOTIFICATION_PACK_TID%type;
tYPE t_client_id is table of TCLIENT_NOTIFICATION_PACK.client_id%type;
tYPE t_notif_tid is table of TCLIENT_NOTIFICATION_PACK.clnt_notification_pack_tid%type;
v_client_id t_client_id;
v_notif_tid t_notif_tid;

[code]....

5) After running this procedure, i shud see 5124 records, but i see zero records.

View 23 Replies View Related

SQL & PL/SQL :: Delete Duplication In A Table

Jul 7, 2011

I want to delete the duplicate rows in a table. there is no column which can be used to differentiate between the rows.

SELECT column_name1
FROM [table]
WHERE column_name2 = cond
GROUP BY column_name1
HAVING COUNT (column_name1) > 1

from the above query i can find the duplication in the table and can delete through it. But what i want one record of each duplication not to be deleted most probably the record added last to the table.

View 13 Replies View Related

SQL & PL/SQL :: Delete Table If Exist

Jan 18, 2013

delete table if exist

How do we write this code in oracle / sqlplus

View 4 Replies View Related

SQL & PL/SQL :: Delete Even Rows Of A Table

Oct 25, 2006

How to delete even rows of a table or rather alternate rows of a table.

View 31 Replies View Related

SQL & PL/SQL :: Getting Error While Using Delete In Table

Feb 19, 2012

Declare
Cursor Cur_Emp Is
Select Empno,Ename
From Emp;
Type Type_Emp Is Table Of Cur_Emp%Rowtype Index By Binary_Integer;
[code].......

View 4 Replies View Related

SQL & PL/SQL :: How To Delete 1% Of Rows From A Table

Jun 13, 2011

I have a table, in that i have "n" no of rows from that i want to delete 1% of rows from that table

View 26 Replies View Related

SQL & PL/SQL :: Delete Record From A Table

Oct 14, 2010

I have tried the following delete statement but it is taking long time,and it's not giving any result.

DELETE FROM hs_table WHERE sno=1234 and effdt='25-MAY-10';

The records in the table are 90000.And we are deleting only one report.

View 6 Replies View Related

SQL & PL/SQL :: Delete From A Table With Between Dates

Dec 7, 2011

I am trying to schedule a store procedure and wanted to remove some data from a table starting from a date and increase the delete by day until a specified date. I wrote the below function; but i can't get to work.

--Start
CREATE OR REPLACE FUNCTION remove_DateField return VARCHAR2 IS

i PLS_INTEGER;
startdate Date ;
endDate Date;
currentDate Date;
stopDate Date;
[code]....

View 8 Replies View Related

How To Delete Duplicate Entries In A Table

Sep 8, 2008

In oracle 9i ........How to delete duplicate entries in a table ?

if suppose in a table named office, one or more entry(row) is repeated more then twice or minimum twice.
I need a query to delete the multiple entries ....

Note:
--->No constraints applied on the table.
--->No Primary Key
--->You cannot create any object....that is no view or a duplicate table can be created

View 3 Replies View Related

SQL & PL/SQL :: Delete Duplicates From Table Without Using Rowid?

Mar 30, 2010

I am trying to delete duplicates from table without using rowid.

here is data:-

create table test(col1 number(3),col2 varchar2(20));
insert into test values(100,'rocky');
insert into test values(100,'rocky');

[Code]....

I know i am perfoming dml on view. IT wont allow me to perform DML on view which contain columns with expression. IS there any way to delete duplicates without using rowid?

View 36 Replies View Related

SQL & PL/SQL :: Parent And Child Table - Delete Row

May 18, 2010

I have a parent table and child table. I want a row to be deleted from the parent table which is referenced by a child row. Is there a way to achieve this. I dont have permission to re create the table or alter the table using delete cascade option. Is there a way to do it in sql.

SQL> create table t1(a number primary key, b number);
SQL> create table t2(c number, d number references t1(a));
SQL> insert into t1 values(1,2);
SQL> insert into t1 values(2,3);
SQL> insert into t1 values(3,4);
SQL> insert into t2 values(10,3);
SQL> insert into t2 values(20,2);
SQL> delete from t1 where a=2;
delete from t1 where a=2
*

ERROR at line 1:
ORA-02292: integrity constraint (CISBATCH.SYS_C00763501) violated - child
record found

View 11 Replies View Related

SQL & PL/SQL :: Delete Duplicate Records From A Table

Apr 13, 2011

I need to delete duplicate records from a table (indeed they are multiple duplicates).

Table Data

IDGroupQty
1KK30
1KK0
1KK19
2AA0
2AA30
3AA0
3AA30
3AA30
3AA9

My aim is to delete duplicates out of above data, with the below condtions.

1) first record with value 30 and then with value 0.
2) if there are 3 duplicate records ex: ID is 1 and Group KK, then i have to delete both 30 & 0 qty records.
3) If there are more than 3 duplicate records ex: ID is 3 and Group is AA, the i have to delete all the records with qty value either 30 or 0 and.

I have written a query like below.

SELECT id,
unit,
RANK ()
OVER (PARTITION BY id, unit
ORDER BY id, unit)
num
FROM temp;

with the above query, i am unable to mark this dynamic duplications.

View 10 Replies View Related

SQL & PL/SQL :: How To Delete Parent Table Record

Jul 10, 2012

how to delete Parent table records without affecting to child table dependent records?..

View 5 Replies View Related

SQL & PL/SQL :: Delete Duplicate Records From Table

Aug 30, 2010

How can i delete duplicate records from the table.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved