ngoc <> wrote:
> Hi
> I use "my $header_sql = qq { desc $table };". It does not work.
> But "select column_name from all_tab_columns where table_name =
> \'$table\'" work.
> My problem is "desc $table" matching which "select * from $table"
> than
> select column_name ...........
> (I mean data and column name order matching).
> Thanks
I believe, but am not certain, that "desc" is not valid Oracle SQL syntax.
Rather, it is a command to the oracle tool SQLPLUS. So when you are using
SQLPLUS, it intercepts the desc command and processes it itself. Since
perl is connecting directly to Oracle, not via SQLPLUS, then the command
does not work from Perl.
Xho
--
--------------------
http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB