Hi Gary: What happens when you run the SQL statement by itself, outside of the perl script? The error seems to lie with the SQL and not with perl/DBI. Once you're sure that the SQL statement works by itself, then put it into your script.
Regards, Francis Gary Fung wrote: > Hi, > > I have a Perl program using DBI. I don't know why it will cause error when I use >"GROUP BY..." in SQL "SELECT" statements. > > My coding is similar as: > > $value2 = $dbh->prepare("SELECT page FROM $Table > > GROUP BY page") || die "Couldn't add record, ".$dbh->errstr(); > > Whenever I use "GROUP BY.." , an error statement will go out : > > "SQL ERROR: Can't find table names in FROM clause!" > > Can anyboby give help to me? > > Thank You very much!! > > Regards, > > Gary > > Lonely Christmas(陳奕迅),風箏與風(Twins),無間道(電影)... > 至In手機鈴聲 陪你過冬天 -- This communication is intended for the addressee(s) and may contain confidential and legally privileged information. We do not waive confidentiality or privilege by mistransmission. If you have received this communication in error, any use, dissemination, printing or copying is strictly prohibited; please destroy all electronic and paper copies and notify the sender immediately. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]