|  | Posted by ApexData on 04/26/06 01:34 
I have one table used to maintain information on Service Events.Each record contains a Repair, Maint, and Battery checkbox
 (bound/boolean). Any one of these fields may be checked or left empty.
 Ex. REPAIR=True, MAINT=False, BATTERY=True
 
 I want to generate ONE report that lists all the REPAIRS, then lists
 all the MAINT, and then lists all the BATTERY events.  One group after
 the other in the same report. Because (ex. REPAIR and BATTERY) may
 both be true in the same record, the record will appear 2 times in the
 report, once in the REPAIR group and once in the BATTERY group.
 
 I am not sure how to approach this. I'm new to SQL. I' m using MS
 AccessSQL.
 
 I Tried the following code, but the results are not sorting properly
 and not grouped.
 
 SELECT * FROM [TABLE1] WHERE [REPAIR]
 UNION ALL
 SELECT * FROM [TABLE1] WHERE [MAINT]
 UNION ALL
 SELECT * FROM [TABLE1] WHERE [BATTERY]
  Navigation: [Reply to this message] |