Re: Crosstab in Mysql

2005-04-25 Thread Alvaro Cobo
!. - Original Message - From: Peter Brawley To: Alvaro Cobo Cc: mysql@lists.mysql.com Sent: Monday, April 25, 2005 11:02 PM Subject: Re: Crosstab in Mysql Alvaro, I suspect the error message refers to the subquery missing a non-aggregate column on which to GROUP BY. I may

Re: Crosstab in Mysql

2005-04-25 Thread Peter Brawley
Alvaro, I suspect the error message refers to the subquery missing a non-aggregate column on which to GROUP BY. I may misunderstand your query--I'm not clear why you can't just write ... SELECT   f.PK_partic,   f.FK_IS,   f.OB_familia,   Sum( IF( insumo_or = "Animal1", cantidad_or, 0 ))

RE: Crosstab in Mysql

2005-04-25 Thread mathias fatene
artic ? Best Regards Mathias FATENE Hope that helps *This not an official mysql support answer -Original Message- From: Alvaro Cobo [mailto:[EMAIL PROTECTED] Sent: mardi 26 avril 2005 04:38 To: mysql@lists.mysql.com Subject: Crosstab in Mysql Hi guys: I am quite new

Crosstab in Mysql

2005-04-25 Thread Alvaro Cobo
Hi guys: I am quite new in SQL and I need to build a crosstab based in two tables using Mysql and PHP, but it is becoming quite dificult. I've got the next query, but it keeps giving the next error: "#1241 - Operand should contain 1 column(s)" /*GENERAL EXPLANATION OF THE QUERY I work in