FAQ
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); dbi-users@perl.org
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)
Sent: Monday, June 06, 2005 2:12 PM
To: dbi-users@perl.org
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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
groupdbi-users @
categoriesperl
postedJun 6, '05 at 8:11p
activeJun 7, '05 at 1:11p
posts6
users5
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase