[AccessD] Union Query quick question

Stuart McLachlan stuart at lexacorp.com.pg
Wed Dec 21 14:55:57 CST 2005


On 21 Dec 2005 at 15:32, O'Connor, Patricia (OTDA) wrote:

> Right now I for each CASENO Carea I can get 1 to 3 records. Each record for
> a Caseno, Carea would have a particular grouping filled and the others null
>      C1234,01,a1,a2,a3,  ,  ,  ,  ,  ,  ,
>      C1234,01,  ,  ,  ,b1,b2,b3,
>      C1234,01,  ,  ,  ,  ,  ,  ,c1,c2,c3,
> 
> I would like to have the output look like
>      C1234,01,a1,a2,a3,b1,b2,b3,c1,c2,c3,
> 
Try

Select Distinct CaseNo, CArea, 
max(a1),max(a2),max(a3),
max(b1),max(b2),max(b3),
max(c1),max(c2),max(c3)

>From table1

Group By CaseNo,CArea
 -- 
Stuart





More information about the AccessD mailing list