>My dear Professor
>
>Your codes work fine.
>Is it possible to show output as follows
>
>code -----------May-----------June
>1111 ----------300-----------600
>1112 ----------200--------------0
>1113 ------------ 0------------400
>
>The month names should appear in vertical with data
>
>Please help again
select Code,;
sum(iif(month(Date) = 1, Amount, $0)) as Amount01,;
sum(iif(month(Date) = 2, Amount, $0)) as Amount02,;
...
sum(iif(month(Date) = 12, Amount, $0)) as Amount12;
group by Code;
into cursor Tmp
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)