2007/5/2, Peter Brawley <[EMAIL PROTECTED]>:
Right, give the computed column an alias differeing from the column name, eg

SET @prev='';
SELECT
  IF(area = @prev, '', @prev := area) AS AreaHdr,
  text,amount
FROM products
ORDER BY area DESC;

ok, now it works! thanks!

One last thing: you set, at first, a parameter called @prev with Null
(' ') value: right?

And, after, you use, instead IF ELSE statement, another syntax: is it
trinary operator? if yes, why it not is in the online MySQL manual?

--
http://www.spacemarc.it

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

Reply via email to