473,385 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

deletion issue

Hello,

I want to delete data from all the tables made in a schema.

but i got error.

"object REPORTS does not exist"

but when i search this table from user objects it does not exists.

can any body help me.

thanks


Expand|Select|Wrap|Line Numbers
  1. DECLARE
  2.  query varchar2(700);
  3.  CURSOR cu_idx IS
  4.         SELECT TABLE_NAME FROM USER_TABLES where table_name not like 'REPORT%' AND TABLE_NAME NOT LIKE 'Sheet1%' ;
  5.  BEGIN
  6.   FOR cur_rec IN cu_idx LOOP
  7. query:='delete from ' || cur_rec.TABLE_NAME ;
  8. execute immediate query;
  9. END LOOP;
  10.  END;
  11.  

DECLARE
*
ERROR at line 1:
ORA-06564: object REPORTS does not exist
ORA-06512: at line 8



SQL> SELECT * FROM USER_OBJECTS WHERE OBJECT_NAME = 'REPORTS';

no rows selected
Dec 26 '07 #1
1 1192
amitpatel66
2,367 Expert 2GB
Hello,

I want to delete data from all the tables made in a schema.

but i got error.

"object REPORTS does not exist"

but when i search this table from user objects it does not exists.

can any body help me.

thanks


Expand|Select|Wrap|Line Numbers
  1. DECLARE
  2.  query varchar2(700);
  3.  CURSOR cu_idx IS
  4.         SELECT TABLE_NAME FROM USER_TABLES where table_name not like 'REPORT%' AND TABLE_NAME NOT LIKE 'Sheet1%' ;
  5.  BEGIN
  6.   FOR cur_rec IN cu_idx LOOP
  7. query:='delete from ' || cur_rec.TABLE_NAME ;
  8. execute immediate query;
  9. END LOOP;
  10.  END;
  11.  

DECLARE
*
ERROR at line 1:
ORA-06564: object REPORTS does not exist
ORA-06512: at line 8



SQL> SELECT * FROM USER_OBJECTS WHERE OBJECT_NAME = 'REPORTS';

no rows selected
Your issue seems to be strange. If you dont have the reports table then why are you putting that in WHERE condition of the cursor. That is not required and PATTERN matching again slow down the peroformance of the query!!
Dec 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tuhin Kumar | last post by:
Hi, I have a requirement on improving the deletion rate on on records of a table. The table contains 5 million records, but since deleting everything matching the condition at one go was giving...
0
by: Vic | last post by:
Hi all, When I test the Delete multi table function in MySQL, DELETE table_name ...] FROM table-references I accidentally delete all data in one table. All data in that table are gone...
6
by: sumit | last post by:
i am trying to restrict deletion on local hard drives i have expertise in c, c++, and delphi if the solution can be found on any of the above languages plz inform me.
4
by: Wilsoch | last post by:
Non-programmer here again because my developer stinks. I'm desperately seeking a solution to this issue: I need something in the open event on my main form that will cause all of the tables to...
3
by: Imran Aziz | last post by:
Hello All, I have a delete link on my page, which when clicks calls the URL for deletion, in ASP we use to create a java script confirm box to confirm delete, how can that be done in ASP? Say if I...
3
by: A_Republican | last post by:
I am interested in writing my own secure file deletion program. I want to be able to read and write to my hard drive directly. My application will seach my hard drive for all locations marked for...
4
by: lokki | last post by:
Hello, can anybody tell me what's wrong with following example code? char *k, *v; k = new char; strcpy(k, "a2"); v = new char;
0
by: shivaranjaniadimulam21 | last post by:
Hello, As per the new restrictions on vista I am now creating my application files in Application.CommonAppDataPath folder but now the next problem is I am not able to delete few files created...
4
by: dmorand | last post by:
Ok, I've looked at this for a while now and I'm just not seeing what the issue is. I have a page which is setup to delete records from a table. I'm getting a CF error when I submit. CF Error: ...
1
by: miztaken | last post by:
Hi there, My C# application opens a directory and deals with the files inside it. But at the mean time i can delete the directory from windows. Is there any way i can restrict the deletion of that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.