
fadoua
Novice
Jun 4, 2009, 11:25 AM
Post #1 of 3
(6166 views)
|
trouble whith execute(): ORA-00900
|
Can't Post
|
|
Hi all, I try to execute a select query with this script: #!/usr/bin/perl -w use DBI; use strict; use warnings; my $Bdd = "DBI:Oracle:XE"; my $User = "system"; my $Pass = "espoirvolonte"; my $SEL = "SELECTE * FROM mouvement"; my %attr = ( PrintError => 0, RaiseError => 1 ); my $dbh = DBI->connect($Bdd, $User, $Pass, \%attr) or die "database connection not made:", $DBI::errstr, "\n"; my $sth = $dbh->prepare($SEL); $sth->execute(); while(my $ref = $sth->fetchrow_hashref()) { print "ID_Environnement: $ref->{'ID_MOUVEMENT'}\nLibelle_oper: $ref->{'LIBELLE_OPER'}\nDate_oper: $ref->{'DATE_OPER'}\n\n"; } $dbh->disconnect; but i get this error: DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute) [for Statement "SELECTE * FROM mouvement"] at test1.pl line 18. if someone have an idea please, i really need it. thank you in advance
|