Can you turn off the html and send mail as text instead?
 
So basically you tested it on an Oracle database but your script was using CSV not 
oracle?
 
Bad form my friend.
http://www.tuxedo.org/~esr/faqs/smart-questions.html
 
That wasted much time trailing the wrong stuff.
 
Please do better next time.
 

-----Original Message-----
From: Gary Fung [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 9:52 AM
To: Dan Muey
Subject: RE: Why can't use SQL "GROUP BY..."?



Thanks. 


  I 've asked the author of CSV, Jeff Zucker. He gave me the exact answer: Group BY 
clause is not supported by CSV. That's why I (we) can't find the solution. 


Gary

 Dan Muey <[EMAIL PROTECTED]> wrote: 


 

-----Original Message-----
From: Gary Fung [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, January 11, 2003 10:46 AM
To: Dan Muey
Subject: RE: Why can't use SQL "GROUP BY..."?



Thanks Dan 


 I 've tried the SQL command in Oracle. It works! Of course this simple SQL command is 
valid command. 


I've tried to print out the command you suggested. It seems nothing help. 


I wonder to hear you suggest to use DBI->trace. What is it? And how can I use it to 
solve the problem? 


Thank you for your reply.!! 


Gary 


  Dan Muey &lt;[EMAIL PROTECTED]&gt;的郵件內容: 


I apologize if this has already been covered to but...

Can you run that command by hand and does it work?
Do this to see is both $Table has a value and if the generated code is actaully a 
valid sql command.


$query = "SELECT page FROM $Table GROUP BY page";
print " 

QUERY -$query- 


\n"
$value2 = $dbh->prepare($query) || die "Couldn't add record, ".$dbh->errstr();

Then paste the query into your program and see if it takes it.
IE
Mysql> SELECT page FROM monkey GROUP BY page;

You could also you use DBI->trace.

Again if this has already been covered sorry, I've been away.

Dan

-----Original Message-----
From: Philip Newton [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 09, 2003 11:34 PM
To: Gary fung
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Why can't use SQL "GROUP BY..."?


On Thu, 9 Jan 2003 22:59:03 +0800 (CST), [EMAIL PROTECTED] (Gary fung)
wrote:

> 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!"

Others have pointed out the possibility that $Table may be empty. I'd like to add that 
I think there's another error -- as far as I know, GROUP BY can only be used when you 
have aggregate functions such as SUM, MAX, COUNT(...) etc. (For example, "SELECT 
custno, count(ordernum) FROM orders GROUP BY custno ORDER BY 2 DESC" to select the 
customers together with the number of orders, grouped by customer but sorted by number 
of
orders.)

Did you mean ORDER BY, perhaps?

Cheers,
Philip

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Lonely  
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=001001>
 Christmas(陳奕迅),風箏與風(Twins) 
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=003001>
 ,無間道(電影) 
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=006004>
 ...
至In手機鈴聲  <http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/> 
陪你過冬天


Lonely  
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=001001>
 Christmas(陳奕迅),風箏與風(Twins) 
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=003001>
 ,無間道(電影) 
<http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/ringtone/listsongs?cat=006004>
 ...
至In手機鈴聲  <http://hk.yahoo.com/mail_tagline/?http://hk.ringtone.yahoo.com/> 
陪你過冬天


Reply via email to