Complementing the post above:

I have found that SUM(DISTINCT xxx) is valid with v.5x, not so in v.4x.
While I am trying to convince my ISP to switch the database to a v.5x
server, I would like some help with a workaround - please excuse my
newbness. I have tried :

(select sum(#variables.tableprefix#threads.views) from
#variables.tableprefix#threads where
#variables.tableprefix#threads.forumidfk = #variables.tableprefix#forums.id)
as views, 

instead of :
sum(distinct #variables.tableprefix#threads.views) as views, 

but it returns a zero flat instead of, say, 8, (5+3).

Thank You.

-- 
View this message in context: 
http://www.nabble.com/Query-OK--in-localhost%2C-error-on-ISP-server-tp16738784p16753507.html
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to