I still see what you want as a crosstab query. The only difference, as you
say very well, is that you want to pivot on the date type values and not
the ID values.
The only other thing you need to decide in order to make a crosstab report
is what information goes in the position for the row
/rudy
-Original Message-
From: Shazia Fazili [mailto:[EMAIL PROTECTED]
Sent: maandag 14 juli 2003 19:35
To: Rudy Metzger
Subject: RE: Rows into Columns
Hi Rudy,
Thnaks for ur reply. Your solution is adding up all Payments, while I
don't want all the Payments to be summed. I want
SELECT invoiceid,
IF(count(*)=1,sum(payment),0) pay1,
IF(count(*)=2,sum(payment),0) pay2,
IF(count(*)=3,sum(payment),0) pay3,
IF(count(*)=4,sum(payment),0) pay4,
IF(count(*)=5,sum(payment),0) pay5,
IF(count(*)=6,sum(payment),0) pay6
FROM payment
GROUP