Check for Existance of Objects [message #194338] |
Thu, 21 September 2006 10:10 |
yerics
Messages: 89 Registered: August 2006
|
Member |
|
|
In a procedure, how to check for existance of set of tables before proceeding ahead. For eg
for j in <select....>
loop
<< check for table based on above select clause>>
if present then
<< do further processing
else
<< generate some messages>>
rollback
end loop
-----------------
What I want to do is
for j in < select ...>
loop
<<check for all all objects>>
end loop;
for k in < select ..>>
loop
<< do further processing>>
end loop.
I dont know whether such approach is ok because the selcet statement is repeated twice for 2 loops.
|
|
|
|
Re: Check for Existance of Objects [message #194344 is a reply to message #194340] |
Thu, 21 September 2006 10:29 |
yerics
Messages: 89 Registered: August 2006
|
Member |
|
|
Yes, I query user_Tables to find out if objects exists or not. The select query gives the value on which I check the object name.
But procedurally what logic should I use so that it checks everything first and then only moves ahead.
|
|
|