Could be that page does not exist in the table you are trying to query,
or that $Table is not set or calling a non-existant table...  Try
printing out $Table by itself before calling the SQL statement.

On Thu, 2003-01-09 at 10:09, Francis Henry wrote:
> 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(³¯«³¨³)¡A­·ºå»P­·(Twins)¡AµL¶¡¹D(¹q¼v)...
> > ¦ÜIn¤â¾÷¹aÁn ³­§A¹L¥V¤Ñ
> 
> --
> 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.
-- 
---------------------------
Jason H. Frisvold
Backbone Engineer
Penteledata Engineering
[EMAIL PROTECTED]
RedHat Certified - RHCE # 807302349405893
---------------------------
"Something mysterious is formed, born in the silent void. Waiting alone
and unmoving, it is at once still and yet in constant motion. It is the
source of all programs. I do not know its name, so I will call it the
Tao of Programming."

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to