Sorry,  The query should read:

SELECT 'x'
FROM    all_tables
WHERE  table_name = UPPER(:name)
AND    owner = UPPER(:owner);

-----------------
Ron Reidy
Lead DBA
Array BioPharma, Inc.


-----Original Message-----
From: Reidy, Ron 
Sent: Monday, June 06, 2005 2:12 PM
To: Vergara, Michael (TEM); [email protected]
Subject: RE: How can I...


The data dictionary is your friend ...
 
SELECT 'x'
FROM    all_tables
WHERE  table_name = UPPER(:name);
 

----------------- 
Ron Reidy 
Lead DBA 
Array BioPharma, Inc. 

-----Original Message-----
From: Vergara, Michael (TEM) [mailto:[EMAIL PROTECTED]
Sent: Monday, June 06, 2005 2:12 PM
To: [email protected]
Subject: How can I...



Hi Everyone: 

I want to connect to an Oracle database and test for the existence of 
a table.  My first thought was to SELECT COUNT(*) FROM TABLE, but 
DBI catches the ORA-942 error and I don't know how to catch that. 
It throws the error during the $dbh->execute step;  how do I catch 
an Oracle error returned from that step? 

Or...is there a better way? 

Thanks, 
Mike 


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Reply via email to