DBIx::Chart, ORA-00907: missing right parenthesis



Hi,
I'm getting following error when I use the below attached script. I'm
trying to generate multiline graph. Can any body help me. What am I
doing wrong?

Error message:
----------------------------------------------------------------------------------------------------------------------------------
Prep chart:
ORA-00907: missing right parenthesis (DBD ERROR: error possibly near
<*> indicator at char 489 in 'select * from

(select
to_char(sample_date, 'dd-MON-yyyy') Dt,
to_number(replace(total_m,',','')) Total_M

from
dbreg.DATABASE_MONTHLY_GROWTH

where
DB_ID = 'GIS_PRD'
AND TABLESPACE = 'GIS_DATA'<*>')

---------------------------------------------------------------------------------------------------------------------------------


=================THE SCRIPT======================================

#!/apps/oracle/ActivePerl/bin/perl -w

use CGI::Carp qw(fatalsToBrowser);
use Date::Calc qw(:all);
use DBIx::Chart;

#use DBI qw(:sql_types);



#$|=1;

#$^W=1;



$dbh = DBIx::Chart->connect('dbi:Oracle:PD_DBREGPD', '******', '*****'
, { PrintError => 0, RaiseError => 0, AutoCommit => 0 })

or die "Cannot connect\n";

$qry = $dbh->prepare("select * from
(select
to_char(sample_date, 'dd-MON-yyyy') Dt,
to_number(replace(total_m,',','')) Total_M

from
dbreg.DATABASE_MONTHLY_GROWTH

where
DB_ID = 'GIS_PRD'
AND TABLESPACE = 'GIS_DATA'
returning linegraph(*)
where color=red ) Total,
(select
to_char(sample_date, 'dd-MON-yyyy') Dt,
to_number(replace(used_m,',','')) Used_M

from
dbreg.DATABASE_MONTHLY_GROWTH

where
DB_ID = 'GIS_PRD'
AND TABLESPACE = 'GIS_DATA'
returning linegraph(*)
where color=red ) Used
returning image, image
WHERE
WIDTH=600 AND HEIGHT=400 AND format='PNG' and
KEEPORIGIN=1 and SHOWGRID=1 and linewidth=2 and
gridcolor='lgray' and x_orient='VERTICAL' and
x_axis = ' ' and y_axis = 'MB' and
SIGNATURE='IPG-DBS : Jeyakanthan' and
TITLE = 'Table Growth (GIS_DATA)' and
MAPTYPE='HTML'",{
chart_type_map => [
[ { NAME => 'Dt', TYPE => SQL_VARCHAR, PRECISION => 20 },
{ NAME => 'Total_M', TYPE => SQL_NUMBER } ],
[ { NAME => 'Dt', TYPE => SQL_VARCHAR, PRECISION => 20 },
{ NAME => 'Used_M', TYPE => SQL_NUMBER } ],
],
}

)|| die("Prep chart:\n$DBI::errstr\n");

#$qry->bind_param(1, $tbl);

$qry->execute() || die("Exec chart:\n$DBI::errstr\n");

$img = $qry->fetchrow_arrayref;
dump_img($img,'png','test',1);

$qry->finish;
$dbh->commit;
$dbh->disconnect;


sub dump_img {
my ($row, $fmt, $fname, $nomap) = @_;
open(OUTF, ">../htdocs/ipg-dbs/tmp/test.png");
binmode OUTF;
print OUTF $$row[0];
close OUTF;

#print HTML $$row[1], "\n" unless $nomap;
#1;
}


print "Content-type: text/html\n\n";

print<<HTML;

<html>
<head>test</head>
<body>
<table>
<tr><td><img src=/ipg-dbs/tmp/test.png usemap=#multwidth></td></tr>
</table>
</body>
</html>
HTML

exit;

==========================END OF SCRIPT===========================

.



Relevant Pages

  • Re: window.print() and postpack, how both works?
    ... can any body help me? ... Emit the javascript code to print the page in the click event handler. ... Therefore you'll have to render each element as HTML. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: need js for l&b search
    ... using html ... any body help me ... Roedy Green Canadian Mind Products ...
    (comp.lang.java.help)
  • need js for l&b search
    ... I need programsfor linear & binary searh ... using html ... any body help me ...
    (comp.lang.java.help)
  • Re: start or stop a remote service
    ... If a script exists that does what you need to do, ... If you have a spceific question then there are people here that are eager to ... answer reasonable questions but you are effectively ... c++ .can any body help me ... ...
    (microsoft.public.win32.programmer.wmi)
  • Re: need js for l&b search
    ... I need programs(java script) for linear & binary searh ... any body help me ... "Java" is a programming language, ...
    (comp.lang.java.help)