Re: ORA-00900: invalid SQL statement when using Perl DBI::Oracle module

From: Mike Dwyer <dwyermj_at_co,larimer.co.us>
Date: 2000/06/01
Message-ID: <16uZ4.85$4Z1.4402_at_wdc-read-01.qwest.net>#1/1


"Describe <tablename>" is not a SQL statement. It is only valid in SQL*Plus.

"Panos Kavalagios" <P.Kavalagios_at_hydro.ntua.gr> wrote in message news:3936650F.A988BB62_at_hydro.ntua.gr...
> Panos Kavalagios wrote:
>
> > $sth=$dbh->prepare("describe mytablename");
>
> I've been told in a private mail that I can use the database object
> all_tab_columns as an alternative solution to my problem. Thus, the
> following:
>
> $sth=$dbh->prepare("select column_name from all_tab_columns where
> table_name='mytablename'");
>
> gives me the desired result. However, I'm still curious how a trivial
> describe SQL statement could fail. Anyway, thank you very much for your
> time.
>
> Panos Kavalagios
>
Received on Thu Jun 01 2000 - 00:00:00 CEST

Original text of this message