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

From: Jeff Smith <jsmith_at_provide.net>
Date: 2000/06/01
Message-ID: <8h5nbj$bjq4_at_eccws12.dearborn.ford.com>#1/1


You can get the information you need from all_tab_columns, which is a real database object

Panos Kavalagios wrote in message <393611B2.85658DDB_at_hydro.ntua.gr>...
>Hello,
>
> In my perl script, I have written the following:
>
>[ successful connection to the database precedes ]
>
>$sth=$dbh->prepare("describe mytablename");
>
>$sth->execute;
>
>and it throws invalid SQL statement!!! If you write the following:
>
>$sth=$dbh->prepare("select * from tab");
>
>$sth->execute;
>
>it runs perfectly and I get the right data. I should say that "describe"
>runs OK within SQLPlus (both in Windows and Linux) and SQLPlus
>Worksheet. Our Oracle server is:
>
>SQL*Plus: Release 8.1.6.0.0 - Production on Thu Jun 1 10:15:32 2000
>
>(c) Copyright 1999 Oracle Corporation. All rights reserved.
>
>
>Connected to:
>Oracle8i Release 8.1.5.0.0 - Production
>With the Java option
>PL/SQL Release 8.1.5.0.0 - Production
>
>on a Windows NT Server 4.0 (service pack 6). Perl version is:
>
>Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>Platform:
> osname=linux, osvers=2.2.5-22smp, archname=i386-linux uname='linux
>porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999
>i686 unknown '
>
>The DBI module version 1.13 and DBD-Oracle 1.03 (compiled with Oracle
>client 8.1.6).
>
> Could you please have any idea what is the problem about, since I
>need describe SQL command in order to get dynamically the table's
>fields. Is there any other way to do that? Thank you very much in
>advance.
>
>
>Panos Kavalagios
>
>
Received on Thu Jun 01 2000 - 00:00:00 CEST

Original text of this message